ट्रांजिशन इफेक्ट बनाने के लिए, ट्रांजिशन इफेक्ट के लिए प्रॉपर्टी सेट करें। साथ ही इफेक्ट की अवधि भी सेट करें।
transition: height 5s;
ट्रांजिशन इफेक्ट बनाने के लिए निम्न कोड चलाकर देखें:
उदाहरण
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 150px; background: blue; transition: width 3s; } div:hover { width: 250px; } </style> </head> <body> <h1>Heading One</h1> <p>Hover over the below box to change its width.</p> <div></div> </body> </html>