<div class="wrap">
<div class="box"></div>
</div>
body {
margin: auto;
box-sizing: border-box;
}
.wrap {
padding-top: 1%;
margin: 0 auto;
width: 500px;
.box {
text-align: center;
width: 100px;
height: 100px;
background: #ffc04c;
border-radius: 100px;
animation: move 2s infinite;
}
}
@keyframes move {
0% {
border-radius: 100px;
transition: all 0.25s;
}
20% {
border-radius: 60px;
background-color: #5cff47;
transition: all 0.25s;
}
40% {
border-radius: 0px;
background-color: #ff2970;
transition: all 0.25s;
}
60% {
border-radius: 60px;
background-color: #22d1f0;
transition: all 0.25s;
}
100% {
border-radius: 100px;
background-color: #ffc04c;
transition: all 0.25s;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.