2021. 10. 15. 18:15γHTML + CSS + JS
1. transform
CSSμμ λ³νμ μ μ©νκΈ° μν΄μλ transform μμ±μ μ¬μ©ν΄μ ν¨μμ΄λ¦κ³Ό ν¨κ» μμ±ν΄μΌνλ€.
transform : ν¨μ
- 2μ°¨μ λ³νκ³Ό 3μ°¨μ λ³ν
2μ°¨μ λ³νμ μΉ μμλ₯Ό νλ©΄μμ λ³ννλ€. (μνμΌλ‘ μ΄λνκ±°λ, μμ§μΌλ‘ μ΄λ)
3μ°¨μ λ³νμ xμΆκ³Ό yμΆμ μκ·Όκ°μ μ£Όλ zμΆμ μΆκ°ν΄μ λ³ννλ€.
3μ°¨μ λ³νμμ zμΆμ μλ€λ‘ μ΄λνκ³ , 보λ μ¬λ μͺ½μΌλ‘ λ€κ°μ¬μλ‘ κ°μ΄ 컀μ§κ³ λ€λ‘ κ°μλ‘ κ°μ΄ μμμ§λ€.
2. translate() ν¨μ
translate() ν¨μλ μΉ μμλ₯Ό μ΄λμν€λ ν¨μμ΄λ€.
translate() ν¨μλ xμΆμ΄λ yμΆ λλ μμͺ½ λ°©ν₯μΌλ‘ μ΄λν 거리λ₯Ό μ§μ νλ©΄ ν΄λΉ μμκ° μ§μ ν ν¬κΈ°λ§νΌ μ΄λνλ€.
transform : translate(tx, ty)
transfrom : translate3d(tx, ty, tz)
transform : translateX(tx)
transform : translateY(ty)
transform : translateZ(tz)
3. scale() ν¨μ
scale() ν¨μλ μΉ μμλ₯Ό μ§μ ν ν¬κΈ°λ§νΌ νλνκ±°λ μΆμνλ€.
1λ³΄λ€ ν¬λ©΄ νλ, 1λ³΄λ€ μμΌλ©΄ μΆμ
transform : scale(sx, sy)
transform : scale3d(sx, sy, sz)
transform: sacleX(sx)
transform: scaleY(sy)
transfrom: sacleZ(sz)
4. rotate() ν¨μ
rotate() ν¨μλ 2μ°¨μ νμ κ³Ό 3μ°¨μ νμ μμ λͺ¨λ μ¬μ©ν μ μλ€.
transform : rotate(κ°λ)
μ΄λ κ°λμ κ°μ μΌλ°μ μΈ κ°λdegreeλ λλμ radianμ μ¬μ©νλ€.
transform : rotate(rx, ry, κ°λ)
transform: rotate3d (rx, ry, rz, κ°λ)
transform: rotateX(κ°λ)
transform: rotateY(κ°λ)
trnasform: rotateZ(κ°λ)
1οΈβ£ 2μ°¨μ νμ
2οΈβ£ 3μ°¨μ νμ
5. perspective μμ±
perspective μμ±μ μ 체μ μΌλ‘ λ³΄μΌ μ μλλ‘ κΉμ΄κ°μ μ§μ νλ€.
λ°λΌμ μ΄ μμ±μ rotate()ν¨μμ ν¨κ» μ¬μ©νλ©΄ μκ·Όκ°μ μΆκ°ν΄ νμ ννλ₯Ό μ 체μ μΌλ‘ λ³΄μΌ μ μλ€.
perspective μμ±μ λν 3μ°¨μ λ³νμμ μ¬μ©νλ€.
μλ μλ μμΉμμ μ¬μ©μκ° μλ λ°©ν₯μ΄λ νΉμ λ°λ λ°©ν₯μλ‘ μ‘μ λΉκΈ°κ±°λ λ°μ΄λ΄μ΄ μκ·Όκ°μ νμνλ€.
6. skew() ν¨μ
skew() ν¨μλ μ§μ ν κ°λλ§νΌ μμλ₯Ό λΉνμ΄ μ곑νλ€.
transform : skew(xκ°λ, yκ°λ)
transform : skewX(xκ°λ)
transform : skewY(yκ°λ)
skewX() ν¨μλ κ°λκ° μμλ©΄ μΌμͺ½μ΄ μ¬λΌκ°κ³ μ€λ₯Έμͺ½μ΄ λ΄λ €κ°λ€.
skewY() ν¨μλ κ°λκ° μμλ©΄ μ€λ₯Έμͺ½μ΄ μ¬λΌκ°κ³ μΌμͺ½μ΄ λ΄λ €κ°λ€.
'HTML + CSS + JS' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
9-3. CSS μ λλ©μ΄μ μ¬μ©νκΈ° (animation,@keyframs, animation-duration, ..) (0) | 2021.10.15 |
---|---|
9-2. CSS νΈλμ§μ (transition-property, transition-duration, transition-timing-function, transition-delay) (0) | 2021.10.15 |
8-4. CSS κ³ κΈμ νμ μ°μ΅λ¬Έμ 1,2 (0) | 2021.10.15 |
8-3. CSS κ°μ ν΄λμ€μ κ°μ μμ (0) | 2021.10.15 |
8-2. CSS μμ± μ νμ (0) | 2021.10.14 |