CSS : μ λλ©μ΄μ (animation)
μ΄λ² μκ°μλ CSSλ‘ ννν μ μλ μ λλ©μ΄μ μμ±λ€μ λν΄ μμλ³΄κ² μ΅λλ€! π
#1. animation μμ±μ κΈ°λ³Έ νν
animation : name | duration | timing-function | delay | iteration | direction | fill-mode | play-state
μ λλ©μ΄μ : μ΄λ¦ | μ§μμκ° | νμ΄λ° κΈ°λ₯ | μ§μ°μκ° | λ°©ν₯ | μ±μ°κΈ° λͺ¨λ | μ¬μ μν
#2. animationμ μ’ λ₯
λ€μμ animationμ μ’ λ₯μ λλ€~! νλ₯Ό 보며 ν¨κ» μμλ΄ μλ€!
μ’ λ₯ | μμ |
---|---|
animation-name | @keyframeμ μ§μ λ μ΄λ¦μ μ€μ ν©λλ€. |
animation-duration | μ λλ©μ΄μ μ΄ μ€νλλ μκ°μ μ€μ ν©λλ€. |
animation-timing-function | μ λλ©μ΄μ ν€νλ μ μμ§μμ μ€μ ν©λλ€. |
animation-delay | μ λλ©μ΄μ μ΄ μμλκΈ° μ κΉμ§ μκ°μ μ€μ ν©λλ€. |
animation-iteration | μ λλ©μ΄μ λ°λ³΅ νμλ₯Ό μ€μ ν©λλ€. |
animation-derection | μ λλ©μ΄μ λ°©ν₯μ μ€μ ν©λλ€. |
animation-fill-mode | μ λλ©μ΄μ λλκ³ λ λ€ μ΄λ€ κ°μ μ μ©ν μ§ μ€μ ν©λλ€. |
animation-play-state | μ λλ©μ΄μ μ€ν μνλ₯Ό μ€μ ν©λλ€. |
#3. transtion μ’ λ₯
λ€μμ animationμ transtion μ’ λ₯μ λλ€~! νλ₯Ό 보며 ν¨κ» μμλ΄ μλ€!
μ’ λ₯ | μμ |
---|---|
transition-property | νΈλ μ§μ μ μ μ©ν CSS μμ± λμμ μ€μ ν©λλ€. |
transition-druation | νΈλ μ§μ μλμκ°μ μ€μ ν©λλ€. |
transition-timing-function | νΈλ μ§μ μμ§μ ν¨κ³Όλ₯Ό μ€μ ν©λλ€. |
transition-delay | νΈλ μ§μ μ΄ μμλκΈ° μ κΉμ§ μκ°μ μ€μ ν©λλ€. |
#4. timing-function μ’ λ₯
λ€μμ animationμ transtion μ’ λ₯μ λλ€~! νλ₯Ό 보며 ν¨κ» μμλ΄ μλ€!
μ’ λ₯ | μμ |
---|---|
transition-property | νΈλ μ§μ μ μ μ©ν CSS μμ± λμμ μ€μ ν©λλ€. |
transition-druation | νΈλ μ§μ μλμκ°μ μ€μ ν©λλ€. |
transition-timing-function | νΈλ μ§μ μμ§μ ν¨κ³Όλ₯Ό μ€μ ν©λλ€. |
transition-delay | νΈλ μ§μ μ΄ μμλκΈ° μ κΉμ§ μκ°μ μ€μ ν©λλ€. |
#4-2. timing-function μμ
λ€μμ animationμ transtion μμ μ λλ€~! μ λλ©μ΄μ κ³Ό μ½λλ₯Ό 보며 κ°κ° μ΄λ€ ν¨κ³ΌμΈμ§ μμλ΄ μλ€!
π timing-function
π‘ CSS μ½λ 보기
.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%;}
}
π timing-function
π‘ CSS μ½λ 보기
.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);}
π cubic-bezier
π‘ CSS μ½λ 보기
.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);}
π animation-delay
π‘ CSS μ½λ 보기
.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;}
π animation-delay
π‘ CSS μ½λ 보기
.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;}
π animation-direction
π‘ CSS μ½λ 보기
.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;}
π animation-fill-mode
π‘ CSS μ½λ 보기
.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);}
}
π animation-play-state
π‘ CSS μ½λ 보기
.timing30.running {animation: move2 4s 100 ease; animation-play-state: running;}
.timing30.paused {animation: move2 4s 100 ease; animation-play-state: paused;}
}
π Animatine.css
π‘ CSS μ½λ 보기
.timing30.running {animation: move2 4s 100 ease; animation-play-state: running;}
.timing30.paused {animation: move2 4s 100 ease; animation-play-state: paused;}
}
λ§λλ λκΈ μμλΆκ³Ό ꡬλ μμλΆμ νμν©λλΉπ±
'CSS' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[CSS] μ λλ©μ΄μ 04 : μ¨μ΄λΈ~~μ¨μ΄λΈ~~ (6) | 2022.09.19 |
---|---|
[CSS] μ λλ©μ΄μ μ€μ΅ : κ±·κΈ° μ λλ©μ΄μ (from.ν 맀ν ) (4) | 2022.09.08 |
[CSS] SVG : μ λλ©μ΄μ ꡬννκΈ° (5) | 2022.09.08 |
[CSS] SVG : λ°±ν° κ·Έλν½ λν νννκΈ° (5) | 2022.09.08 |
[CSS] μ λλ©μ΄μ μ€μ΅ : λ‘λ© (3) | 2022.08.30 |
λκΈ