অ্যানিমেশন কতবার চলবে তা সেট করতে animation-iteration-count প্রোপার্টি ব্যবহার করুন।
নিচের উদাহরণে অ্যানিমেশনের কাউন্ট ২ সেট করা হয়েছে:
উদাহরণ
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 200px; background-color: yellow; animation-name: myanim; animation-duration: 2s; animation-iteration-count: 2; } @keyframes myanim { from { background-color: green; } to { background-color: blue; } } </style> </head> <body> <div> </div> </body> </html>