CSS animation-play-state 속성
예시
애니메이션 일시중지:
div {
animation-play-state: paused;
}
아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.
정의 및 사용
이 animation-play-state
속성은 애니메이션이 실행 중인지 일시 중지되었는지 지정합니다.
참고: JavaScript에서 이 속성을 사용하여 주기 중간에 애니메이션을 일시 중지합니다.
기본값: | 달리기 |
---|---|
상속: | 아니요 |
애니메이션 가능: | 아니요. 애니메이션 가능 에 대해 읽기 |
버전: | CSS3 |
자바스크립트 구문: | 개체 .style.animationPlayState="일시 중지" |
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
-webkit-, -moz- 또는 -o- 뒤에 오는 숫자는 접두사와 함께 작동한 첫 번째 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
animation-play-state | 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-play-state: paused|running|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
paused | Specifies that the animation is paused | |
running | Default value. Specifies that the animation is running | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS 애니메이션
HTML DOM 참조: animationPlayState 속성
더 많은 예
예시
호버 시 애니메이션 일시 중지:
div:hover {
animation-play-state: paused;
}