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>

更新日期:2020 年 6 月 25 日

188 人瀏覽

開拓你的 事業

透過完成課程獲得認證

開始學習
廣告
© . All rights reserved.