CSS animation-iteration-count 속성
예시
애니메이션을 두 번 재생합니다.
div {
animation-iteration-count: 2;
}
아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.
정의 및 사용
속성 은 animation-iteration-count
애니메이션을 재생해야 하는 횟수를 지정합니다.
기본값: | 1 |
---|---|
상속: | 아니요 |
애니메이션 가능: | 아니요. 애니메이션 가능 에 대해 읽기 |
버전: | CSS3 |
자바스크립트 구문: | 개체 .style.animationIterationCount="무한" |
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
-webkit-, -moz- 또는 -o- 뒤에 오는 숫자는 접두사와 함께 작동한 첫 번째 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
animation-iteration-count | 43.0 4.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
CSS 구문
animation-iteration-count: number|infinite|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
number | A number that defines how many times an animation should be played. Default value is 1 | |
infinite | Specifies that the animation should be played infinite times (for ever) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
더 많은 예
예시
애니메이션을 영원히 재생합니다.
div {
animation-iteration-count: infinite;
}
관련 페이지
CSS 튜토리얼: CSS 애니메이션
HTML DOM 참조: animationIterationCount 속성