当前第2页 返回上一页
html代码:
1 2 3 | < div class = "demo" >
< img class = "an img" src = "/test/img/2.png" width = "500" height = "500" />
</ div >
|
旋转代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | .demo{
text-align: center;
margin-top: 100px;
}
@-webkit-keyframes rotation{
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}
.an{
-webkit-transform: rotate(360deg);
animation: rotation 3s linear infinite;
-moz-animation: rotation 3s linear infinite;
-webkit-animation: rotation 3s linear infinite;
-o-animation: rotation 3s linear infinite;
}
.img{border-radius: 250px;}
|
实现效果:

相关推荐:CSS教程
以上就是css怎么设置图片不停旋转的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
css中能加减乘除吗
css怎么让连续数字字母换行
css教程
css怎么设置图片的对比度
《css权威指南》怎么样
你所不知道的css规则,值得收藏!!
用css3实现打点效果实例讲解
css怎么设置行距
深入浅析css text-emphasis属性,看看它的用法!
css transition属性怎么用
更多相关阅读请进入《css》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » css怎么设置图片不停旋转