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