<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .box{ width: 120px; height: 40px; line-height: 40px; text-align: center; background: darkblue; color: #ffffff; margin: 0 auto; } .box:hover{ transform: rotate(360deg) scale(2,1.2); } .pop{ width: 500px; height: 50px; background: red; animation: change 5s infinite ; animation-fill-mode: forwards; } @keyframes change { 0%{ width: 500px; } 50%{ width: 800px; } 100%{ width: 300px; } } </style> </head> <body> <div class="box">CSS过度</div> <div class="pop"></div> </body> </html>
html移动动画
最新推荐文章于 2025-07-12 15:02:52 发布