코드랩 레퍼런스

animation-delay 본문

CSS

animation-delay

webstoryboy 2016. 6. 7. 19:01

animation-delay 속성은 요소가 로드된 후 애니메이션이 시작될 때 까지의 시간을 나타냅니다.
특징 설명
기본 값 0s
상속 안됨
애니메이션 안됨
버전 CSS3

Definition

  • animation-delay 속성은 요소가 로드된 후 애니메이션이 시작될 때 까지의 시간을 나타냅니다.

Syntax

animation-delay: time | inherit;

Property

속성 값 설명
time 요소가 로드된 후 애니메이션이 시작될 때 까지의 시간을 설정합니다.
inherit animation-delay를 상위 요소한테 상속받습니다.

Compatibility

크롬 아이콘 파이어폭스 아이콘 사파리 아이콘 오페라 아이콘 안드로이드 아이콘 ios 아이콘 익스플로러6 아이콘 6 익스플로러7 아이콘 7 익스플로러8 아이콘 8 익스플로러9 아이콘 9 익스플로러10 아이콘 10 익스플로러11 아이콘 11 엣지 아이콘
animation-delay

Sample1 클릭하면 지정한 횟수만큼 움직이는 예제입니다.

Animation-delay

count
count
count
count
Click : 클릭하면 이미지가 움직입니다.

  • .list div.count1 {animation: move1 1s ease; animation-iteration-count: 1}
  • .list div.count2 {animation: move1 1s ease; animation-iteration-count: 2}
  • .list div.count3 {animation: move1 1s ease; animation-iteration-count: 3}
  • .list div.count4 {animation: move1 1s ease; animation-iteration-count: infinite;}
<!DOCTYPE html>
	<html lang="ko">
	<head>
		<meta charset="UTF-8">
		<title>CSS</title>
		<style>
			.list > div {width: 60px; height: 60px; background-image: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); line-height: 60px; text-align: center; border-radius: 50%;font-size: 12px; color: #fff; margin: 10px; position: relative;}
			.list div.count1 {animation: move1 1s ease; animation-iteration-count: 1}
			.list div.count2 {animation: move1 1s ease; animation-iteration-count: 2}
			.list div.count3 {animation: move1 1s ease; animation-iteration-count: 3}
			.list div.count4 {animation: move1 1s ease; animation-iteration-count: infinite;}

			@keyframes move1 {
				0% {left: 0%;}
				50% {left: calc(100% - 70px);}
				100% {left: 0%;}
			}
		</style>
	</head>
	<body>

		<div class="list">
			<div>count</div>
			<div>count</div>
			<div>count</div>
			<div>count</div>
		</div>

		<div class="btn">
			<a href="#c" class="line">Click : 클릭하면 이미지가 움직입니다.</a>
		</div>
	
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
		<script type="text/javascript">
			$(".btn a").click(function(){
				$(".list > div").eq(0).addClass("count1");
				$(".list > div").eq(1).addClass("count2");
				$(".list > div").eq(2).addClass("count3");
				$(".list > div").eq(3).addClass("count4");
			});
		</script>
	</body>
</html>   


Share

Ad

Comments