Animate CSS height property

CSSWeb DevelopmentFront End Technology

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

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            border: 2px solid black;
            width: 300px;
            height: 100px;
            animation: myanim 5s infinite;
         }
         @keyframes myanim {
            30% {
               height: 400px;
            }
         }
      </style>
   </head>
   <body>
      <div>This is demo text</div>
   </body>
</html>
raja
Published on 07-Jun-2018 15:04:43
Advertisements