运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 50px; background: red; color: white; font-weight: bold; transition: width 2s; } #div1 {transition-timing-function: cubic-bezier(0,0,1,1);} #div2 {transition-timing-function: cubic-bezier(0.25,0.1,0.25,1);} #div3 {transition-timing-function: cubic-bezier(0.42,0,1,1);} #div4 {transition-timing-function: cubic-bezier(0,0,0.58,1);} #div5 {transition-timing-function: cubic-bezier(0.42,0,0.58,1);} div:hover { width: 300px; } </style> </head> <body> <h1>The transition-timing-function Property</h1> <div id="div1">cubic-bezier(0,0,1,1)</div> <div id="div2">cubic-bezier(0.25,0.1,0.25,1)</div> <div id="div3">cubic-bezier(0.42,0,1,1)</div> <div id="div4">cubic-bezier(0,0,0.58,1);</div> <div id="div5">cubic-bezier(0.42,0,0.58,1)</div> <p>Hover over the div elements above, to see the different transition effects.</p> </body> </html>