Usage of CSS transition-delay property

CSSWeb DevelopmentFront End Technology

Use the transition-delay property to delay the transition effect with CSS. You can try to run the following code to set a 1 second delay of transition

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 150px;
            height: 150px;
            background: blue;
            transition: width 3s;
            transition-delay: 1s;
         }
         div:hover {
            width: 250px;
         }
      </style>
   </head>
   <body>
      <h1>Heading One</h1>
      <p>Hover over the below box to change its width. It begins with a delay of 1 second.</p>
      <div></div>
   </body>
</html>
raja
Published on 16-May-2018 16:03:14
Advertisements