CSS3實現頭像旋轉效果執行個體分享

來源:互聯網
上載者:User
本文主要介紹了CSS3實現頭像旋轉效果,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧,希望能協助到大家。

滑鼠未放上效果:

滑鼠放上之後旋轉效果:

transition: all 2.0s;表示所有的屬性變換在2秒內完成;

transform: rotate(360deg);表示圖片旋轉360度。

<!DOCTYPE html><html>    <head>        <meta charset="UTF-8">        <title></title>        <style>            img{                border: #000 solid 2px;                display: block;                margin: 50px auto;                border-radius: 50%;                transition: all 2.0s;            }            img:hover{                transform: rotate(360deg);            }        </style>    </head>    <body>        <img src="img/03.jpg" />    </body></html>

相關推薦;

執行個體詳解HTML5、CSS3實現3D轉換效果

詳解CSS和HTML自訂checkbox效果

關於css3多個元素依次顯示效果的實現方法

相關文章

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.