λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°
CSS/Animation

CSS animation

by oranssy 2022. 9. 8.
728x90
λ°˜μ‘ν˜•

⭐️ CSS μ• λ‹ˆλ©”μ΄μ…˜ ⭐️


01. 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 μ• λ‹ˆλ©”μ΄μ…˜ μ‹€ν–‰ μƒνƒœλ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.

02. transtion

transtion : property | durtion | timing-function | delay

μ’…λ₯˜ μ˜ˆμ‹œ
transition-property νŠΈλ Œμ§€μ…˜μ„ μ μš©ν•  CSS 속성 λŒ€μƒμ„ μ„€μ •ν•©λ‹ˆλ‹€.
transition-druation νŠΈλ Œμ§€μ…˜ μž‘λ™μ‹œκ°„μ„ μ„€μ •ν•©λ‹ˆλ‹€.
transition-timing-function νŠΈλ Œμ§€μ…˜ μ›€μ§μž„ 효과λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.
transition-delay νŠΈλ Œμ§€μ…˜μ΄ μ‹œμž‘λ˜κΈ° μ „κΉŒμ§€ μ‹œκ°„μ„ μ„€μ •ν•©λ‹ˆλ‹€.

03. 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) λ²„μ§€λ‹ˆμ•„ 곑선 값을 λ§Œλ“€μ–΄μ„œ μ„€μ •ν•©λ‹ˆλ‹€.
728x90
λ°˜μ‘ν˜•

λŒ“κΈ€