2d旋转(css3实现过度效果和动画效果)
作者:互联网
效果:
源码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"> *{ margin: 0px; padding: 0; } .box{ width: 240px; margin: 100px auto; } /*过度效果*/ /*.qq{*/ /*transition: all 1s;*/ /*}*/ /*.qq:hover{*/ /*transform: rotate(360deg);*/ /*}*/ /*动画效果*/ .qq:hover{ animation: zhuan 0.1s linear infinite; } @-webkit-keyframes zhuan { from{ transform: rotate(0); }to{ transform: rotate(360deg); } } </style> </head> <body> <div class="box"> <img src="zhuan.jpg" alt="" class="qq"> </div> <script type="text/javascript"> </script> </body> </html>
图片:
标签:css3,qq,rotate,效果,transform,2d,hover,360deg 来源: https://www.cnblogs.com/alex-xxc/p/10397805.html