- 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
Specify the speed curve of the animation with CSS
Use the animation-timing-function to set the speed curve of the Animation. You can try to run the following code to achieve this
Example
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; position: relative; background-color: yellow; animation-name: myanim; animation-duration: 2s; animation-direction: alternate-reverse; animation-iteration-count: 3; } @keyframes myanim { from {left: 100px;} to {left: 200px;} } #demo1 {animation-timing-function: ease;} #demo2 {animation-timing-function: ease-in;} </style> </head> <body> <div id = "demo1">ease effect</div> <div id = "demo2">ease-in effect</div> </body> </html>
- Related Articles
- Which CSS property is to be used to set the speed curve of the Animation?
- How to set the speed curve of the transition effect with CSS
- Light Speed In Animation Effect with CSS
- Light Speed Out Animation Effect with CSS
- Set an animation with the same speed from start to end with CSS
- Specify the background image with CSS
- Specify the size of the background images with CSS
- Specify position of the background images with CSS
- Specify width for the columns with CSS
- Specify the color of the cursor in elements with CSS
- Specify the gap between the columns with CSS
- Specify the left padding of an element with CSS
- Specify the bottom padding of an element with CSS
- Specify the top padding of an element with CSS
- Specify the right padding of an element with CSS

Advertisements