css 动画
项目使用:
DOM
<div class="circle1 animate__rotate360"></div>
CSS
.circle1 {
position: absolute;
width: 230px;
height: 230px;
margin: 5px;
background-image: url(/static/img/index/circle1.png);
}
.animate__rotate360 {
animation-duration: 8s;
animation-name: rotate_360;
}
@keyframes rotate_360 {
from {
transform: rotate(0deg);
}
50% {
transform:rotate(-360deg);
}
to {
transform:rotate(0deg);
}
}
也有插件可以使用
animate css
https://github.com/animate-css/animate.css