সিএসএস animation-direction
🌈সিএসএস animation-direction কি?
📋সিএসএস animation-direction হলো অ্যানিমেশন চালানোর দিক নির্ধারণ করার পদ্ধতি।
⚒️সিএসএস animation-direction অ্যানিমেশন চালানোর দিক নির্ধারণ করতে ব্যবহৃত হয়।
সিএসএস animation-direction অ্যানিমেশন চালানোর দিক নির্ধারণ করার উদাহরণ।
css
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.animation {
width: 50px;
height: 50px;
background: pink;
position: relative;
animation: myfirst 5s 2;
animation-direction: alternate;
}
@keyframes myfirst {
0% {background: red; left: 0px; top: 0px;}
25% {background: yellow; left: 200px; top: 0px;}
50% {background: blue; left: 200px; top: 200px;}
75% {background: green; left: 0px; top: 200px;}
100% {background: red; left: 0px; top: 0px;}
}
</style>
</head>
<body>
<div class="animation"></div>
</body>
</html>