CSS
 Computer >> コンピューター >  >> プログラミング >> CSS

CSSのアウトラインオフセットプロパティをアニメーション化する


アニメーションをoutline-offsetに実装するには CSSでプロパティを使用すると、次のコードを実行してみることができます-

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 350px;
            height: 150px;
            outline: 2px solid blue;
            animation: myanim 3s infinite;
         }
         @keyframes myanim {
            50% {
              outline-offset: 50px;
            }
         }
      </style>
   </head>
   <body>
      <h1>CSS outline-offset property</h1>
      <div> </div>
   </body>
</html>

  1. CSSのz-indexプロパティをアニメーション化する

    CSSを使用してz-indexプロパティにアニメーションを実装するには、次のコードを実行してみてください- 例 <!DOCTYPE html> <html>    <head>       <style>          div {             position: absolute;          }   &nb

  2. CSSの幅のプロパティをアニメーション化

    幅でアニメーションを実装するには CSSでプロパティを使用すると、次のコードを実行してみることができます- 例 <!DOCTYPE html> <html>    <head>       <style>          div {             width: 300px;             height: 25