css怎么设置图片不停旋转


当前第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;}

实现效果:

72ecf3bd4847d7396cb1ec9fe1d4399.png

相关推荐:CSS教程

以上就是css怎么设置图片不停旋转的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

css如何增加边框

谈谈css中的混合模式

css如何设置下划线的颜色

css中hgroup是什么意思

css怎么设置平行虚线

css怎么设置div边框

css超链接的底色如何设置

css如何实现各种形状

移动端h5页面实现生成图片的代码

border属性怎么用

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...