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怎么设置图片的对比度

css权威指南》怎么样

你所不知道的css规则,值得收藏!!

css3实现打点效果实例讲解

css怎么设置行距

深入浅析css text-emphasis属性,看看它的用法!

css transition属性怎么用

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




打赏

取消

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

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

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

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

评论

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