애니메이션은 움직임 시간, 움직임 지연 시간, 움직임 방향, 움직임 속도, 움직임 진행상태, 움직임 반복 횟수, 움직임 진행상태, 움직임 속도, 키프레임 이름 등을 설정하여 원하는 애니메이션을 구현 할 수 있습니다.
animation-fill-mode
animation-fill-mode 속성은 애니메이션이 끝난 후의 상태를 설정합니다.
특징 | 설명 |
---|---|
기본 값 | animation-fill-mode : none |
적용 | animation |
버전 | CSS3 |
사용성 | ★★☆☆☆ |
정의(Definition)
- animation-fill-mode 속성은 애니메이션이 끝난 후의 상태를 설정합니다.
애니메이션과 관련된 속성(Animation Related Properties)
- animation 속성은 애니메이션과 관련된 속성을 일괄적으로 설정합니다.
- animation-delay 속성은 애니메이션 지연 시간을 설정합니다.
- animation-direction 속성은 애니메이션 움직임 방향을 설정합니다.
- animation-duration 속성은 애니메이션 움직임 시간을 설정합니다.
- animation-fill-mode 속성은 애니메이션이 끝난 후의 상태를 설정합니다.
- animation-iteration-count 속성은 애니메이션 반복 횟수를 설정합니다.
- animation-name 속성은 애니메이션 keyframe 이름을 설정합니다.
- animation-play-state 속성은 애니메이션 진행상태를 설정합니다.
- animation-timing-function 속성은 애니메이션 움직임의 속도를 설정합니다.
문법(Syntax)
animation-fill-mode : none | forwards | backwards | both | inherit;
/* 애니메이션 끝난 후 설정 */
animation-fill-mode : none;
animation-fill-mode : forwards;
animation-fill-mode : backwards;
animation-fill-mode : both;
/* 애니메이션 속기형 작성법 */
animation: ani 1s 3 backwards; /* keyframe이름, 지속시간, 반복횟수, 끝난 후 상태설정 */
속성(Property)
속성값 | 설명 |
---|---|
none | 애니메이션이 끝난 후 상태를 설정하지 않습니다. |
forwards | 애니메이션이 끝난 후 그 지점에 그대로 있습니다. |
backwards | 애니메이션이 끝난 후 시작점으로 돌아옵니다. |
both | 애니메이션이의 앞 뒤 결과를 조합하여 설정합니다. |
inherit | 애니메이션의 상태를 상위 요소한테 상속받습니다. |
호환성(Compatibility)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
animation-fill-mode | ○ | ○ | ○ | ○ | ○ | ❌ | ❌ | ❌ | ❌ | ○ | ○ | ○ | ○ | ○ |