css 實現旋轉風車

來源:互聯網
上載者:User

這篇文章主要介紹了關於css 實現旋轉風車 ,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下

1. 放置風車圖片

<img src="imgs/fengche.jpg" alt="小風車">

2. css

@keyframes rotating {       from{           transform: rotate(0);       }       to{           transform: rotate(360deg);       } } img{       animation: rotating 1.2s linear infinite }

linear:勻速
infinite表示無限次迴圈動畫


效果 (錄製jif,原效果平滑)

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.