cubic-bezier() CSS 函式的使用


使用cubic-bezier()函式來定義三次貝塞爾曲線。你可以嘗試執行以下程式碼來實現cubic-bezier()函式

示例

線上演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 100px;
            height: 100px;
            background: yellow;
            transition: width 3s;
            transition-timing-function: cubic-bezier(0.3, 0.3, 2.0, 0.9);
         }
         div:hover {
            width:200px;
         }
      </style>
   </head>
   <body>
      <p>Hover over the below container:</p>
      <div></div>
   </body>
</html>

更新於:25-Jun-2020

188 次瀏覽

開啟你的 職業 生涯

透過完成課程獲得認證

立即開始
廣告
© . All rights reserved.