728x90
반응형

CSS 애니메이션 효과
animation
animation : name | duration | timing-function | delay | iteration | direction | fill-mode | play-state
| 종류 | 예시 |
|---|---|
| animation-name | @keyframe에 지정된 이름을 설정합니다. |
| animation-duration | 애니메이션이 실행되는 시간을 설정합니다. |
| animation-timing-function | 애니메이션 키프레임 움직임을 설정합니다. |
| animation-delay | 애니메이션이 시작되기 전까지 시간을 설정합니다. |
| animation-iteration | 애니메이션 반복 횟수를 설정합니다. |
| animation-derection | 애니메이션 방향을 설정합니다. |
| animation-fill-mode | 애니메이션 끝나고 난 뒤 어떤 값을 적용할지 설정합니다. |
| animation-play-state | 애니메이션 실행 상태를 설정합니다. |
transtion
transtion : property | durtion | timing-function | delay
| 종류 | 예시 |
|---|---|
| transition-property | 트렌지션을 적용할 CSS 속성 대상을 설정합니다. |
| transition-druation | 트렌지션 작동시간을 설정합니다. |
| transition-timing-function | 트렌지션 움직임 효과를 설정합니다. |
| transition-delay | 트렌지션이 시작되기 전까지 시간을 설정합니다. |
timing-function
| 종류 | 예시 |
|---|---|
| linear | 일정한 간격으로 설정합니다. |
| ease | 처음에는 서서히 가속하고 마지막 부분에서 급격히 감속합니다. |
| ease-in | 처음에는 천천히 시작하고 마지막에 가속합니다. |
| ease-out | 처음에는 최대 속도로 시작하고 마지막에 감속합니다. |
| ease-in-out | 처음에는 제로 속도로 시작하고, 중간 지점에서 최고 속도로 움직이고, 마지막 부분에서 서서히 감속합니다. |
| step-start | 애니메이션을 시작점에서 설정합니다. |
| step-end | 애니메이션을 끝점에서 설정합니다. |
| steps(int, start/end) | 애니메이션을 단계별을 설정합니다. |
| cubic-bezier(n,n,n,n) | 버지니아 곡선 값을 만들어서 설정합니다. |
애니메이션 예시1
.timing1.show {animation: move 2s 1 linear;}
.timing2.show {animation: move 2s 1 ease;}
.timing3.show {animation: move 2s 1 ease-in;}
.timing4.show {animation: move 2s 1 ease-out;}
.timing5.show {animation: move 2s 1 ease-in-out;}
@keyframes move {
0% {left: 0%;}
50% {left: 100%;}
100% {left: 0%;}
}
애니메이션 예시2
.timing6.show {animation: move 4s 1 step-start;}
.timing7.show {animation: move 4s 1 step-end;}
.timing8.show {animation: move 4s 1 steps(4, start);}
.timing9.show {animation: move 4s 1 steps(4, end);}
.timing10.show {animation: move 4s 1 steps(10, start);}
.timing11.show {animation: move 4s 1 steps(10, end);}
애니메이션 예시3
애니메이션 예시4
.timing.bg3 > div {background-image: linear-gradient(-60deg, #ff5858 0%, #f09819 100%);}
.timing12.show {animation: move 3s 2 cubic-bezier(0,.71,0,1);}
.timing13.show {animation: move 3s 2 cubic-bezier(0,.71,1,-0.28);}
.timing14.show {animation: move 3s 2 cubic-bezier(1,-0.52,1,-0.28);}
.timing15.show {animation: move 3s 2 cubic-bezier(1,.02,0,1.01);}
.timing16.show {animation: move 3s 2 cubic-bezier(.33,2.04,1,2.05);}
애니메이션 예시5
.timing17.show {animation: move 3s 0.1s 2 ease;}
.timing18.show {animation: move 3s 0.2s 2 ease;}
.timing19.show {animation: move 3s 0.3s 2 ease;}
.timing20.show {animation: move 3s 0.4s 2 ease;}
애니메이션 예시6
.timing21.show {animation: move 1s 1 ease;}
.timing22.show {animation: move 1s 2 ease;}
.timing23.show {animation: move 1s 3 ease;}
.timing24.show {animation: move 1s infinite ease;}
애니메이션 예시7
.timing25.normal {animation: move2 4s 5 ease normal;}
.timing26.reverse {animation: move2 4s 5 ease reverse;}
.timing27.alternate {animation: move2 4s 5 ease alternate;}
.timing28.alternate-reverse {animation: move2 4s 5 ease alternate-reverse;}
애니메이션 예시8
.timing26.show {animation: move3 3s 1 ease; animation-fill-mode: none;}
.timing27.show {animation: move3 3s 1 ease; animation-fill-mode: forwards;}
.timing28.show {animation: move3 3s 1 ease; animation-fill-mode: backwards;}
.timing29.show {animation: move3 3s 1 ease; animation-fill-mode: both;}
@keyframes move3 {
0% {left: 0%;}
100% {left: calc(100% - 120px);}
}
애니메이션 예시9
.timing30.running {animation: move2 4s 100 ease; animation-play-state: running;}
.timing30.paused {animation: move2 4s 100 ease; animation-play-state: paused;}
'CSS' 카테고리의 다른 글
| CSS - 통통 튀는 글자 효과 (2) | 2022.09.22 |
|---|---|
| CSS - 마우스 오버 효과 (3) | 2022.09.20 |
| SVG 알아보기 (5) | 2022.09.07 |
| 정신없이 움직이는 원 애니메이션 (1) | 2022.09.02 |
| 빙글빙글 도는 원 애니메이션 (3) | 2022.08.29 |
댓글