
π κΈ°λ³Έ μ νμ
| νκ·Έλͺ | νκ·Έ μ ν |
| .classλͺ | class μ ν |
| #idλͺ | id μ ν |
π μ 체 μ νμ
| * | μ 체 μ ν |
π μμ μ νμ
| > | μμ(μ§κ³) μ ν |
π λμ μ νμ
| ~ | λͺ¨λ λ€ λμ μ ν |
| + | λ°λ‘ λ€ λμ μ ν |
π μμ± μ νμ
[μμ±="κ°"]
ex) ul li input[type='text']{}
π μμ±κ° μΌμΉ μ νμ
| ~= | ν΄λΉ λ¨μ΄ ν¬ν¨ μ ν (λμ΄μ°κΈ° κΈ°μ€) |
| *= | ν΄λΉ λ¨μ΄ ν¬ν¨ μ ν |
| ^= | ν΄λΉ λ¨μ΄λ‘ μμ μ ν |
| |= | ν΄λΉ λ¨μ΄λ‘ μμ μ ν |
| $= | ν΄λΉ λ¨μ΄λ‘ λ μ ν |
ex) h1[title*='μ λͺ©']{}
π μν μ νμ
| :checked | 체ν¬λ μν |
| :enabled | μμ κ°λ₯ μν |
| :disabled | μμ λΆκ°λ₯ μν |
| :focus | μ΄μ μ΄ λ§μΆ°μ§ μν |
π child, of-type
child => λΆλͺ¨ κΈ°μ€ μμλ€
| :first-child | 첫 λ²μ§Έ μμ μ ν |
| :last-child | λ§μ§λ§ μμ μ ν |
| :nth-child(n) | n λ²μ§Έ μμ μ ν |
of-type => λ³ΈμΈ κΈ°μ€ νμ λ€
| :first-of-type | 첫 λ²μ§Έ μ ν |
| :last-of-type | λ§μ§λ§ μ ν |
| :nth-of-type(n) | n λ²μ§Έ μ ν |
(+) even : μ§μ (2n) / odd : νμ (2n+1)
π μ ν μ νμ
| ::before | μ κ³΅κ° μ ν |
| ::after | λ· κ³΅κ° μ ν |
π λΆμ μ νμ
| :not() | μ μΈνκ³ λλ¨Έμ§ μ ν |
π κ·Έ μΈ
| ::first-letter | μ κΈμλ§ μ ν |
| ::first-line | 첫 μ€λ§ μ ν |
| ::selection | click+drag μν |
π‘ κ°μ΄ 보면 μ’μ Post
[CSS] μμ΄λ³΄λ₯Ό μν font / background / border μμ± μ΄μ 리
cssμμ μμ±μ 'μκ³ λ°©ν₯'μΌλ‘ μ μ© 4κ°μΌ λ : top right bottom left 2κ°μΌ λ : xμΆ(top, bottom) yμΆ(left, right) 1κ°μΌ λ : all π Font color : ν μ€νΈ μμ font-size : ν μ€νΈ μ¬μ΄μ¦ default : 16px..
devjindev.tistory.com
'βοΈ > CSS' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
| [CSS] animation (0) | 2020.12.19 |
|---|---|
| [CSS] transition (0) | 2020.12.13 |
| [CSS] link (hover, active, visited, link) (0) | 2020.12.12 |
| [CSS] display (inline, inline-block, block) / μ°¨μ΄μ (0) | 2020.12.12 |
| [CSS] float / ν΄μ νλ λ°©λ² (0) | 2020.12.12 |