<div class="box"></div>
<div class="footer">
Нажмите "RERUN", чтобы запустить анимацию
</div>
.footer {
margin-top: 150px;
width:100%;
text-align:center;
background: darkgrey;
padding:2% 0;
color:#fff;
font-size:20px;
}
.box {
width: 100px;
height: 100px;
background: blue;
position:relative;
animation: move 2s ease-in-out 1 both, width 2s ease-in-out 2s 1 both;
}
@keyframes move {
0% {
top:0;
}
100% {
top:80px;
}
}
@keyframes width {
0% {
width: 100px;
}
100% {
width: 300px;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.