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

CSSのline-heightプロパティでアニメーションを実行する


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

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            animation: mymove 3s infinite;
            line-height: 20px;
         }
         @keyframes mymove {
            70% {
               line-height: 50px;
            }
         }
      </style>
   </head>
   <body>
      <p>This is demo text! This is demo text! This is demo text!
         This is demo text! This is demo text! This is demo text!
         This is demo text! This is demo text! This is demo text!
         This is demo text! This is demo text! This is demo text!
      </p>
   </body>
</html>

  1. CSSのpadding-topプロパティでアニメーションを実行する

    CSSを使用してpadding-topプロパティにアニメーションを実装するには、次のコードを実行してみてください- 例 <!DOCTYPE html> <html>    <head>       <style>          div {             width: 350px;             heig

  2. CSSのtext-justifyプロパティ

    CSSのtext-justifyプロパティは、text-alignプロパティがjustify値に設定されている場合に、テキストの位置揃え方法を設定するために使用されます。プロパティ値は次のとおりです- text-justify: auto|inter-word|inter-character|none|initial|inherit; 例 ここで、CSSでtext-justifyプロパティを実装する例を見てみましょう- <!DOCTYPE html> <html> <head> <style> div {    text-a