css實現圖片360度旋轉


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>

  提示:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM