动画名称最好不要用-链接比如不采用rotate-360。
<div class="profile rotate360">
<image src="https://profile.csdnimg.cn/A/0/F/2_qq_36413371"></image>
</div>
/* 旋转动画 */
.rotate360 {
animation-name: rotate360;
animation-duration: 5000ms;
animation-fill-mode: forwards;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
@keyframes rotate360 {
0% {
transform: rotate(0);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(360deg);
}
}