마지막 키프레임에서 설정한 스타일 값을 유지하도록 요소를 설정하려면 animation-fill-mode를 사용하세요. 역방향 값이 있는 속성
예
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 200px;
position: relative;
background: red;
animation-name: myanim;
animation-duration: 2s;
animation-fill-mode: backwards;
}
@keyframes myanim {
from {left: 0px; background-color: green;}
to {left: 200px; background-color: blue;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>