Perform Animation on CSS min-height

CSSWeb DevelopmentFront End Technology

To implement animation on min-height property with CSS, you can try to run the following code

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            overflow: auto;
            width: 350px;
            background-color: blue;
            color: white;
            border: 1px solid black;
            animation: myanim 3s infinite;
         }
         @keyframes myanim {
            30% {
               min-height: 250px;
            }
         }
      </style>
   </head>
   <body>
      <h1>Example of min-height</h1>
      <div>
         <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.
            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>
      </div>
   </body>
</html>
raja
Published on 07-Jun-2018 13:32:40
Advertisements