ease-in-out과 함께 animation-timing-function 속성을 사용하세요. CSS로 느리게 시작하고 끝나는 애니메이션을 설정하는 값:
예시
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 200px;
position: relative;
background-color: #808000;
animation-name: myanim;
animation-duration: 2s;
animation-direction: alternate-reverse;
animation-iteration-count: 3;
}
@keyframes myanim {
from {left: 100px;}
to {left: 200px;}
}
#demo {animation-timing-function: ease-out;}
</style>
</head>
<body>
<div id = "demo">ease-in-out effect</div>
</body>
</html>