h5让图片转圈的动效,让页面动起来

来源:互联网 发布:怎么把淘宝店铺关闭 编辑:程序博客网 时间:2024/05/16 19:04

h5让图片转圈的动效,让页面动起来
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;    }

用到的图片是这个:(就是白色转动的那个图片)
这里写图片描述