- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add CSS transition effect for both the width and height property
To add transition effect for width and height property of an element, you can try to run the following code
Example
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 150px; background: blue; transition: width 3s; } div:hover { width: 250px; height: 250px; } </style> </head> <body> <h1>Heading One</h1> <p>Hover over the below box to change its width and height.</p> <div></div> </body> </html>
- Related Articles
- Set the name of the CSS property the transition effect is for
- Set a delay for the CSS transition effect
- How to set the CSS property that the transition effect is for with JavaScript?
- CSS Transition property
- CSS transition-duration property
- How to delay the Transition Effect with CSS
- CSS transition-timing-function property
- The width and height properties in CSS
- How to create a transition effect with CSS?
- Use CSS width property for responsive image
- Usage of CSS transition-delay property
- CSS width property
- Create a transition effect on hover pagination with CSS
- Width and Height of Elements in CSS
- Use CSS max-width property for responsive image

Advertisements