CSS Transition property

CSSWeb DevelopmentFront End Technology

Use the CSS transition property to set all the four transition properties into a single line. You can try to run the following code to work with the transition property −

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 150px;
            height: 150px;
            background: blue;
            transition: height 3s;
         }
         div:hover {
            height: 250px;
         }
      </style>
   </head>
   <body>
      <h1>Heading One</h1>
      <p>Hover over the below box to change its height.</p>
      <div></div>
   </body>
</html>
raja
Published on 16-May-2018 12:34:55
Advertisements