- 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
How to set the speed curve of the transition effect with CSS
Use the transition-timing-function property to set the speed curve of the transition effect. The values you can set are: ease, ease-in, ease-out, linear, etc.
Example
You can try to run the following code to set the speed curve of the transition effect with CSS −
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: red; transition: width 4s; } #effect1 { transition-timing-function: linear; } #effect2 { transition-timing-function: ease-in; } div:hover { width: 250px; } </style> </head> <body> <h1>Transition Effect</h1> <p>Hover over the div elements and see the transition effect and the speed:</p> <div id = "effect1">linear effect</div><br> <div id = "effect2">ease-in effect</div><br> </body> </html>
- Related Articles
- How to delay the Transition Effect with CSS
- Set the speed of the hover effect with CSS
- How to set the CSS property that the transition effect is for with JavaScript?
- Set a delay for the CSS transition effect
- How to create a transition effect with CSS?
- Set the name of the CSS property the transition effect is for
- How to set when the transition effect will start with JavaScript?
- Set up different speed curves with CSS transition-timing-function
- Specify the speed curve of the animation with CSS
- Set how many seconds or milliseconds a CSS transition effect takes to complete
- Which CSS property is to be used to set the speed curve of the Animation?
- Create a transition effect on hover pagination with CSS
- Set Mask Effect with CSS
- Set Invert Effect with CSS
- Set Grayscale Effect with CSS

Advertisements