एनिमेशन फॉरवर्ड चले, बैकवर्ड, या अल्टरनेट साइकल में, यह तय करने के लिए animation-direction प्रॉपर्टी का उपयोग करें:
उदाहरण
<!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>