Use the transition-duration property in CSS to set the number of seconds or milliseconds required for the CSS transition effect to complete −
Live Demonstration
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 150px; background: blue; transition-property: height; transition-duration: 2s; } div:hover { height: 200px; } </style> </head> <body> <h1>Heading One</h1> <p>Hover over the below box to change its height.</p> <div></div> </body> </html>
The above is the detailed content of Sets how many seconds or milliseconds a CSS transition effect takes to complete. For more information, please follow other related articles on the PHP Chinese website!