animation-direction প্রোপার্টি দিয়ে এনিমেশনটি ফরওয়ার্ড, রিভার্স বা অ্যালটারনেট (বিকল্পভাবে) চালানো যায়। মানগুলো: normal, reverse, alternate, alternate-reverse।
উদাহরণ
<!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>
এখানে reverse ব্যবহার করা হয়েছে, তাই এনিমেশন নীল থেকে সবুজে যাবে (ডিফল্টই হলো সবুজ থেকে নীল)।