时间:2021-07-01 10:21:17 帮助过:40人阅读
1.先瞧瞧效果:

2.代码是这样的:
<img src="images/circle.png" alt="" id="circle"/>
@mixin ani-btnRotate{
@keyframes btnRotate{
from{transform: rotateZ(0);}
to{transform: rotateZ(360deg);}
}
}
@include ani-btnRotate;
#circle{
position: absolute;
left: 50%;
width: REM(338);
height: REM(338);
margin-top: REM(200);
margin-left: REM(-338/2);
transform-origin: center center ;
animation: btnRotate 1s 1s linear forwards;
}用到的图片是这个:(就是白色转动的那个图片)

相信看了本文案例你已经掌握了方法,更多精彩请关注Gxl网其它相关文章!
推荐阅读:
select下拉框的右边怎么增加提示图标
怎样用canvas实现自定义头像功能
H5的Drag与Drop详解
以上就是html5怎么实现图片转圈的动画效果的详细内容,更多请关注Gxl网其它相关文章!