- 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
Set the name of the CSS property the transition effect is for
To set the name of the CSS property the transition effect is, use the CSS transition-property.
In the below example, we have set the property as width and set the duration as well:
Example
<!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>
- Related Articles
- How to set the CSS property that the transition effect is for with JavaScript?
- Set a delay for the CSS transition effect
- Add CSS transition effect for both the width and height property
- How to set the speed curve of the transition effect with CSS
- How to delay the Transition Effect with CSS
- CSS Transition property
- CSS transition-duration property
- Usage of CSS transition-delay property
- How to set when the transition effect will start with JavaScript?
- Set how many seconds or milliseconds a CSS transition effect takes to complete
- CSS transition-timing-function property
- Set the speed of the hover effect with CSS
- Usage of CSS transition-timing-function property
- How to create a transition effect with CSS?
- Create a transition effect on hover pagination with CSS

Advertisements