效果很好玩,代碼很簡單:html
效果:web
鼠標放置在圖片上:360度順時針旋轉網站
鼠標離開圖片:圖片260度逆時針旋轉url
只要將下面代碼拷貝過去,並將圖片改爲你想要的就能夠看到效果spa
<!doctype html> <html> <head> <meta charset="utf-8"> <title>鼠標懸停圖片360度旋轉效果</title> <style> .xwcms { width: 220px; height: 220px; margin: 0 auto; background: no-repeat url(%E6%8B%9B%E5%95%86/img/arrow.gif) left top; -webkit-background-size: 220px 220px; -moz-background-size: 220px 220px; background-size: 220px 220px; -webkit-border-radius: 110px; border-radius: 110px; -webkit-transition: -webkit-transform 2s ease-out; -moz-transition: -moz-transform 2s ease-out; -o-transition: -o-transform 2s ease-out; -ms-transition: -ms-transform 2s ease-out; } .xwcms:hover { -webkit-transform: rotateZ(360deg); -moz-transform: rotateZ(360deg); -o-transform: rotateZ(360deg); -ms-transform: rotateZ(360deg); transform: rotateZ(360deg); } </style> </head> <div class="xwcms"> </div> <body> </body> </html>
推薦一個神同樣的網站,上面有各類特效:http://www.xwcms.net/.net
以上3d
ENDcode