▣ 애니메이션의 타이밍 설정하기
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>애니메이션의 타이밍 설정하기</title>
<style>
div {
width: 100px;
height: 100px;
background-color: red;
color: white;
position: relative;
animation: boxmove 5s alternate;
}
#box1 {
animation-delay: 1s;
animation-iteration-count: 3;
animation-timing-function: ease;
}
#box2 {
animation-delay: 2s;
animation-iteration-count: 3;
animation-timing-function: linear;
}
#box3 {
animation-delay: 3s;
animation-iteration-count: 3;
animation-timing-function: ease-out;
}
@keyframes boxmove {
from {
left: 0px;
}
to {
left: 300px;
}
}
</style>
</head>
<body>
<div id="box1">애니메이션 박스 1</div>
<div id="box2">애니메이션 박스 2</div>
<div id="box3">애니메이션 박스 3</div>
<p><strong>참고 : </strong>IE9 이하 혹은 낮은 버전에서는 지원하지 않습니다. </p>
</body>
</html>