

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 an animation with the same speed from start to end with CSS
Use the animation-timing-function property, with the linear value to set animation with the same speed from start to end with CSS
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;} } #demo {animation-timing-function: linear;} </style> </head> <body> <div id = "demo">linear effect</div> </body> </html>
- Related Questions & Answers
- Set an animation with a slow start and end using CSS
- Set an animation with a slow start, then fast, and end slowly with CSS
- Set a delay for the start of an animation with CSS
- Set animation with a slow start using CSS
- Set animation with a slow end using CSS
- Light Speed In Animation Effect with CSS
- Light Speed Out Animation Effect with CSS
- Specify the speed curve of the animation with CSS
- How to set the fill-mode for an Animation with CSS
- Set the speed of the hover effect with CSS
- Set how many times an Animation should run with CSS
- How to delay an animation with CSS
- Shorthand property to set all the animation properties with CSS
- How to set the speed curve of the transition effect with CSS
- Which CSS property is to be used to set the speed curve of the Animation?
Advertisements