सभी एनिमेशन प्रॉपर्टीज़ सेट करने की शॉर्टहैंड प्रॉपर्टी animation है। यह एनिमेशन अवधि, एनिमेशन नाम आदि सेट करती है।
एनिमेशन शॉर्टहैंड प्रॉपर्टी के साथ काम करने के लिए निम्न कोड चलाकर देखें:
उदाहरण
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; background-color: yellow; animation: myanim 2s } @keyframes myanim { from { background-color: green; } to { background-color: blue; } } </style> </head> <body> <div></div> </body> </html>