animation-fill-mode প্রোপার্টি নির্ধারণ করে যে এনিমেশন চলা নাও থাকলে (শুরু হওয়ার আগে বা শেষ হওয়ার পর) এলিমেন্ট কোন স্টাইল ধারণ করবে। মূল মানগুলো: none (ডিফল্ট), forwards, backwards, both।
উদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 200px;
position: relative;
background: red;
animation-name: myanim;
animation-duration: 2s;
animation-fill-mode: forwards;
}
@keyframes myanim {
from { left: 0px; background-color: green; }
to { left: 200px; background-color: blue; }
}
</style>
</head>
<body>
<div></div>
</body>
</html>
নোট: এই উদাহরণে forwards ব্যবহার করা হয়েছে। প্রয়োজনীয়তা অনুযায়ী backwards বা both ব্যবহার করুন।