您的位置:首页 > Web前端 > CSS

CSS3实现图片旋转 transform keyframes

2017-08-19 14:53 246 查看
<img class="Rotation img" src="img/01.png" width="500" height="500"/>

(keyframes相当于设定启动器rotation,并规定开始和结束的动作)

@-webkit-keyframes rotation{

from {-webkit-transform: rotate(0deg);}

to {-webkit-transform: rotate(360deg);}

}

(.Rotation类名定义样式,定义动画的过程)

.Rotation{

animation: rotation 3s linear infinite;

-moz-animation: rotation 3s linear infinite;

-webkit-animation: rotation 3s linear infinite;

-o-animation: rotation 3s linear infinite;

}

animation属性:

rotation--为绑定kerframes

3s--动画速度

linear--动画模式 匀速

infinite--无限进行动画
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: