鼠标悬浮到div上,div进行360°旋转
<!DOCTYPE html> <html> <head> <title>旋转</title> </head> <style> .bg{ width: 200px; height: 200px; margin: 10px; border-radius: 50%; text-align: center; box-shadow: 0 1px 8px #666; } .bg:hover{ transition: all 0.5s ease-in; transform:rotate(360deg); } </style> <body> <div class="bg">旋转吧</div> </body> </html>