๋ฐ์ํ
CSS ์ ํ์๋ฅผ ์ฐ์ตํ ์ ์๋ ์ฌ์ดํธ์ด๋ค.
ํ์ด์ง์ ์ ์ํ๋ฉด ์๋์ ๊ฐ์ด ํ๋ฉด์ด ๋จ๋๋ฐ, ์๋จ์ ๋ฌธ์ ์ ๋ง๊ฒ Editor์ ์์ฑํ๋ฉด๋๋ค.
ํ๊ทธ๋ช ์ด plate์ธ ํ๊ทธ๋ฅผ ์ ํํ๋ ๊ฒ์ด๋, css editor์ plate๋ผ๊ณ ์ฐ๋ฉด ์ฑ๊ณต์ด๋ค ใ ใ
์ค๋ฅธ์ชฝ html์ฝ๋๋ฅผ ์ฐธ๊ณ ํ๋ฉด์ ๋ฌธ์ ๋ฅผ ํ๋์ฉ ํ์ด๊ฐ๋ฉด๋๋ค!
์๋๋ 1๋ฒ~32๋ฒ์ ์ ๋ต์ด๋ค.
1 | plate | ํ๊ทธ ์ ํํ๊ธฐ |
2 | bento | ํ๊ทธ ์ ํํ๊ธฐ |
3 | #fancy | id์ ํํ๊ธฐ |
4 | plate apple | ํ๊ทธ(plate) ์์ ํ๊ทธ(apple) ๋ชจ๋ ์ ํํ๊ธฐ |
5 | #fancy pickle | id๊ฐ ๋ถ์ ํ๊ทธ ์์ ํ๊ทธ(pickle) ์ ํํ๊ธฐ |
6 | .small | class ์ ํํ๊ธฐ |
7 | orange.small | ํ๊ทธ(orange) ์ค class(small)๊ฐ ๋ถ์ ํ๊ทธ ์ ํํ๊ธฐ |
8 | bento orange.small | ํ๊ทธ(bento) ์์ ํ๊ทธ(orange) ์ค class(small)๊ฐ ๋ถ์ ํ๊ทธ ์ ํํ๊ธฐ |
9 | plate, bento | ํ๊ทธ๋ค(plate์ bento) ์ ํํ๊ธฐ |
10 | * | ๋ชจ๋ ํ๊ทธ ์ ํํ๊ธฐ |
11 | plate * | ํ๊ทธ(plate) ์์ ๋ชจ๋ ํ๊ทธ ์ ํํ๊ธฐ |
12 | plate + apple | ํ๊ทธ(plate) ๋ค์์ ์ค๋ ํ๊ทธ(apple) ํ๊ฐ ์ ํํ๊ธฐ |
13 | bento ~ pickle | ํ๊ทธ(bento) ๋ค์์ ์ค๋ ํ๊ทธ(pickle) ๋ชจ๋ ์ ํํ๊ธฐ |
14 | plate > apple | ํ๊ทธ(plate) ๋ฐ๋ก ๋ค์์ ์ค๋ ํ๊ทธ(apple) ์ ํํ๊ธฐ |
15 | orange:first-child | ํ๊ทธ ์ค ์ฒซ๋ฒ์งธ ์์ ์ ํํ๊ธฐ |
16 | plate :only-child | ํ๊ทธ ์ค ์์์์ ์ ํํ๊ธฐ (plate์ : ์ฌ์ด์ ๊ณต๋ฐฑ ์ฃผ์) |
17 | .small:last-child | ํ๊ทธ ์ค ๋ง์ง๋ง ์์ ์ ํํ๊ธฐ |
18 | plate:nth-child(3) | ํ๊ทธ ์ค 3๋ฒ์งธ ์์ ์ ํํ๊ธฐ |
19 | bento:nth-last-child(3) | ํ๊ทธ ์ค ๋ง์ง๋ง์์ ์ญ์์ผ๋ก 3๋ฒ์งธ ์์ |
20 | apple:first-of-type | ํ๊ทธ ์ค ์ฒซ๋ฒ์งธ ์์ |
21 | plate:nth-of-type(2n) | ํ๊ทธ ์ค 2์ ๋ฐฐ์๋ฒ์งธ ์์ |
22 | plate:nth-of-type(2n+3) | ํ๊ทธ ์ค 3๋ฒ์งธ๋ถํฐ ์์ํ๊ณ , ๊ทธ ํ๋ก๋ 2์ ๋ฐฐ์๋ฒ์งธ ์์ ์ ํ |
23 | plate .small:only-of-type | ์ ์ผํ plate .small ์ ํ |
24 | orange:last-of-type, apple:last-of-type | ๊ฐ ํ๊ทธ ์ค ๋ง์ง๋ง์์ ์ ํ |
25 | bento:empty | ์์์ด ์๋ ํ๊ทธ ์ ํ |
26 | apple:not(.small) | ํ๊ทธ(apple) ์ค .small ํด๋์ค๊ฐ ์๋ ํ๊ทธ(apple) ์ ํ |
27 | [for] | for์์ฑ์ด ๋ถ์ ํ๊ทธ ์ ํ |
28 | plate[for] | ํ๊ทธ ์ค for์์ฑ์ด ๋ถ์ ํ๊ทธ ์ ํ |
29 | bento[for="Vitaly"] | ํ๊ทธ ์ค for์์ฑ ๊ฐ์ด Vitaly์ธ ํ๊ทธ ์ ํ |
30 | [for^="Sa"] | for์์ฑ ๊ฐ์ด Sa ๋ก ์์ํ๋ ํ๊ทธ ์ ํ |
31 | [for$="ato" | for์์ฑ ๊ฐ์ด ato๋ก ๋๋๋ ํ๊ทธ ์ ํ |
32 | [for*="obb"] | for์์ฑ ๊ฐ์ obb๊ฐ ํฌํจ๋ ํ๊ทธ ์ ํ |
์๋ฃ!
๋ฐ์ํ