애니메이션 방향 사용 애니메이션을 먼저 뒤로 실행한 다음 앞으로 실행하는 속성입니다. 이 속성은 alternate-reverse와 함께 사용됩니다. 이를 달성하기 위한 애니메이션 값입니다.
예
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 200px;
position: relative;
background-color: yellow;
animation-name: myanim;
animation-duration: 2s;
animation-direction: alternate-reverse;
animation-iteration-count: 3;
}
@keyframes myanim {
0% {background-color:green; left:0px; top:0px;}
50% {background-color:maroon; left:100px; top:100px;}
100% {background-color:gray; left:0px; top:0px;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>