ट्रांजिशन इफेक्ट किस CSS प्रॉपर्टी के लिए है, उसका नाम सेट करने के लिए CSS transition-property का उपयोग करें।
नीचे उदाहरण में, हमने प्रॉपर्टी को width और अवधि भी सेट की है:
उदाहरण
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 150px; background: blue; transition-property: width; transition-duration: 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>