CSS के साथ ट्रांजिशन इफेक्ट के लिए देरी सेट करने के लिए transition-delay प्रॉपर्टी का उपयोग करें। 2 सेकंड की देरी सेट करने के लिए निम्न कोड चलाकर देखें:
उदाहरण
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 150px; background: blue; transition: width 3s; transition-delay: 2s; } div:hover { width: 350px; } </style> </head> <body> <h1>Heading One</h1> <p>Hover over the below box to change its width. It begins with a delay of 2 seconds.</p> <div></div> </body> </html>