針對 border-right-width 屬性執行動畫


若要透過 CSS 對 border-right-width 屬性實施動畫,你可以嘗試執行以下程式碼

示例

真實演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 500px;
            height: 300px;
            background: yellow;
            border: 15px solid yellow;
            background-image: url('https://tutorialspoint.tw/latest/cuda.png');
            animation: myanim 3s infinite;
            background-position: bottom left;
            background-size: 50px;
         }
         @keyframes myanim {
            30% {
               background-color: maroon;
               border-right-color: red;
               border-right-width: 25px;
            }
         }
      </style>
   </head>
   <body>
      <h2>Performing Animation for border right width</h2>
         <div></div>
   </body>
</html>

更新時間:2020 年 6 月 25 日

76 次瀏覽

啟動你的 職業

完成課程,獲得認證

開始
廣告
© . All rights reserved.