- 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
CSS animation-direction property
Use the animation-direction property to set whether an animation should be played forwards, backward or in alternate cycles.
You can try to run the following code to implement the animation-direction property:
Example
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; background-color: yellow; animation-name: myanim; animation-duration: 2s; animation-direction: reverse; } @keyframes myanim { from { background-color: green; } to { background-color: blue; } } </style> </head> <body> <div></div> </body> </html>
- Related Articles
- Which CSS property is used to run Animation in Reverse Direction?
- CSS animation-delay property
- CSS animation-duration property
- CSS Animation Shorthand property
- CSS animation-name property
- CSS flex-direction Property
- CSS top property with Animation
- CSS animation-fill-mode property
- CSS animation-iteration-count property
- CSS animation-play-state property
- CSS animation-timing-function property
- Perform Animation on CSS clip property
- Perform Animation on CSS color property
- Change CSS columns property with Animation
- Change CSS filter property with Animation

Advertisements