W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: red; transition: width 2s; } #div1 {transition-timing-function: linear;} #div2 {transition-timing-function: ease;} #div3 {transition-timing-function: ease-in;} #div4 {transition-timing-function: ease-out;} #div5 {transition-timing-function: ease-in-out;} div:hover { width: 300px; } </style> </head> <body> <h1>transition-timing-function 属性</h1> <p>请把鼠标悬停在下面的 div 元素上,来查看不同的速度曲线:</p> <div id="div1">linear</div><br> <div id="div2">ease</div><br> <div id="div3">ease-in</div><br> <div id="div4">ease-out</div><br> <div id="div5">ease-in-out</div><br> <p><b>注释:</b>本例在 Internet Explorer 9 和更早版本中不起作用。</p> </body> </html>