首页 > Web开发 > 详细

css实现图片360度旋转

时间:2020-07-15 15:52:04      阅读:153      评论:0      收藏:0      [点我收藏+]

1.图片效果(不能上传视频,只能截图了)

技术分享图片

 2.css代码

 1 <template>
 2     <div calss="testImg">
 3       <div class="roundImg"></div>
 4     </div>
 5 </template>
 6 
 7 <style>
 8     .roundImg{
 9       width: 66%;
10       height: 66%;
11       position: absolute;
12       top: 22%;
13       left: 2%;
14       z-index: 1;
15       background:url("../../../assets/images/danger/dangerBg2.svg") no-repeat center center;
16       background-size: contain;
17       -webkit-animation: round_animate 5s linear infinite;
18       animation: round_animate 5s linear infinite; 
19     }
20     @keyframes round_animate {
21       to {
22         transform: rotate(1turn);
23       }
24     }
25 </style>

  提示:

技术分享图片

 

css实现图片360度旋转

原文:https://www.cnblogs.com/chr506029589/p/13305346.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!