Lefseq
14.01.2021, 10:53
Здравствуйте. Подскажите как сделать, так чтобы картинка совершила одно вертикальное движение снизу вверх и осталась вверху?
<div class="square"></div>
.square {
width: 200px;
height: 200px;
border-radius: 10px;
background-color: #d42929;
position: absolute;
top: 0;
left: 0;
z-index: 1;
animation: move 3s linear alternate infinite;
}
@keyframes move {
0% {
bottom: 0;
}
100% {
top: 200px;
}
}
<div class="square"></div>
.square {
width: 200px;
height: 200px;
border-radius: 10px;
background-color: #d42929;
position: absolute;
top: 0;
left: 0;
z-index: 1;
animation: move 3s linear alternate infinite;
}
@keyframes move {
0% {
bottom: 0;
}
100% {
top: 200px;
}
}