.box {
animation: square_to_circle 1.5s infinite alternate;
/* 以上参数依次是:animation-name动画名称、 duration持续时间、 iteration-count运行次数、 animation-direction动画播放方向 */
}
@keyframes square_to_circle {
from {
width: 100px;
height: 100px;
border-radius: 0;
background-color: #a0d911;
}
to {
width: 200px;
height: 200px;
border-radius: 50%;
background-color: #722ed1;
}
}