谷吧美食网
您的当前位置:首页html5怎么实现图片转圈的动画效果

html5怎么实现图片转圈的动画效果

来源:谷吧美食网
 这次给大家带来html5怎么实现图片转圈的动画效果,html5实现图片转圈的动画效果的注意事项有哪些,下面就是实战案例,一起来看一下。

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详解

显示全文