用css3寫一個可以無限旋轉的div或者圖片


<div class="trans">
 
</div>
 
css
.trans{
display: inline-block;
width:100rpx;
height:100rpx;
border:1px solid red;
border-radius: 50%;
overflow: hidden;
animation: rotate 3s linear infinite;   linear// 意思就是勻速的運動   infinite// 就是無限滾動的意思
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(360deg)}
}


免責聲明!

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



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