fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <style> div { width:100px; height:100px; background:red; transition-property: width; transition-duration: 2s; -webkit-transition-property: width; /* Safari */ -webkit-transition-duration: 2s; /* Safari */ } div:hover { width:300px; } </style> </head> <body> <p><b>注意:</b> 该属性不兼容 IE9以及更早版本的浏览器.</p> <div></div> <p>鼠标移动在块上查看动画效果.</p> </body> </html>
运行结果