- 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 whether an animation should be played forwards or using CSS
Use the animation-direction property to set whether an animation should be played forwards, backward or in alternate cycles:
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
- Set the number of times an animation should be played using CSS
- Set whether the animation is running or paused using CSS
- Set how long an animation should take to complete one cycle using CSS
- Set how many times an Animation should run with CSS
- Run Animation backward first and then forwards with CSS
- Set whether the text should be overridden to support multiple languages with CSS
- Set whether or not an element should be visible while not facing the screen with JavaScript?
- How to set whether an element should be visible in JavaScript?
- Set an animation with a slow start and end using CSS
- Set animation with a slow start using CSS
- Set animation with a slow end using CSS
- How to set whether the image-border should be repeated, rounded or stretched with JavaScript?
- Determine whether an element should be visible when not facing the screen with CSS
- How an or should be resized to fit its container with CSS
- Set whether the text of the element can be selected or not with CSS

Advertisements