
- 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 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 Questions & Answers
- Set the number of times an animation should be played using CSS
- Set whether the animation is running or paused using CSS
- Set how many times an Animation should run with CSS
- Set how long an animation should take to complete one cycle using CSS
- Run Animation backward first and then forwards with CSS
- How to set whether an element should be visible in JavaScript?
- Set whether or not an element should be visible while not facing the screen with JavaScript?
- Set whether the text should be overridden to support multiple languages with 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
- Set an animation with a slow start and end using CSS
- Set whether the table border should be collapsed into a single border or not with JavaScript?
- Set animation with a slow start using CSS
- Set animation with a slow end using CSS
- Specify whether the flex items should wrap or not with CSS
Advertisements