实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>css 过渡效果 实例 - 自学教程(runoops.com)</title> <style> div { width: 200px; height: 200px; background-color: #f00; transition: all 2s; } div:hover { background-color: #00f; transform: translateX(500px) translateY(500px) scale(0.8) rotate(360deg); } </style> </head> <body> <p><b>注意:</b>该实例无法在 Internet Explorer 9 及更早 IE 版本上工作。</p> <div></div> <p>鼠标移动到 div 元素上,查看过渡效果。</p> </body> </html>
运行结果: