๐ ๋จ์ (units)
- ์ ๋ ๊ธธ์ด ๋จ์ : cm, mm, px๋ฑ
- ์๋ ๊ธธ์ด ๋จ์ : em, rem, vw, vh ๋ฑ
- ๋ฐฑ๋ถ๋ฅ : %
1. ์ ๋ ๊ธธ์ด ๋จ์
px
- ๋๋ฐ์ด์ค ํ๋ฉด์์ ์ด๋ฏธ์ง๋ฅผ ํํํ๋ ๊ฐ์ฅ ์์ ๋จ์
- ์์์ ๋์ด, ๋์ด, ํจ๋ฉ, ๋ง์ง, ๋ณด๋ ๊ฐ, ํฐํธ ์ฌ์ด์ฆ ๋ฑ ๊ฐ์ ๋จ์๋ก ์ฌ์ฉ
- ๊ธฐ๋ณธ 16px
2. ์๋ ๊ธธ์ด ๋จ์
- % : ๋ถ๋ชจ ์์ ๊ธฐ์ค์ผ๋ก ๋ฐฑ๋ถ์จ
- em : ๋ถ๋ชจ ์์ ๊ธฐ์ค์ผ๋ก ๋ฐฐ์
- rem : root em, ์ต์์ ์์ html ๊ธฐ์ค์ผ๋ก ๋ฐฐ์
- vw : ํ๋ฉด ๋์ด ๊ธฐ์ค์ผ๋ก ๋ฐฑ๋ถ์จ
- vh : ํ๋ฉด ๋์ด ๊ธฐ์ค์ผ๋ก ๋ฐฑ๋ถ์จ
- vmin : ํ๋ฉด ๋์ด์ ๋์ด ์ค ์์ ๊ฐ์ ๊ธฐ์ค์ผ๋ก ๋ฐฑ๋ถ์จ
- vmax : ํ๋ฉด ๋์ด์ ๋์ด ์ค ํฐ ๊ฐ์ ๊ธฐ์ค์ผ๋ก ๋ฐฑ๋ถ์จ
- ex : ํ์ฌ ํฐํธ์ x-height๊ฐ, ํ์ฌ ํฐํธ์ ์๋ฌธ์ x ๋์ด ๊ฐ์ ๊ธฐ์ค์ผ๋ก ํ ๋ฐฑ๋ถ์จ
๐ font
1. font-size
font-size๊ฐ ๊ฐ์ง ์ ์๋ ๊ฐ
2. font-family
- font-family ์ฌ์ฉํ์ฌ ๊ธ๊ผด ๋ณ๊ฒฝ ๊ฐ๋ฅ
- family-name : ๊ถ์, ๊ตด๋ฆผ, arial๊ฐ์ ๊ธ๊ผด ์ด๋ฆ ์ฌ์ฉ. ๊ธ๊ผด์ด ์ฌ์ฉ์์ ์ปดํจํฐ์ ์ค์น๋์ด ์์ง ์์ ๊ฒฝ์ฐ, ๊ธ๊ผด์ ๋ธ๋ผ์ฐ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ํ์๋จ.
- font format ์ด๋ ํฐํธ๋ฅผ ๊ตฌํํ๋ ๋ฐฉ๋ฒ์ผ๋ก ๋ธ๋ผ์ฐ์ ๋ณ๋ก ์๋ก ๋ค๋ฅธ ํฌ๋งท์ ์ง์
- woff, ttf/off๋ ๋ชจ๋ ๋ธ๋ผ์ฐ์ ์์ ์ง์
3. font-weight
- normal - ๊ธฐ๋ณธ๊ฐ์ด๋ฉฐ ๋ณดํต ๊ตต๊ธฐ
- bold - ๊ตต์ ๊ตต๊ธฐ
- bolder - ์์๋ ๊ฐ๋ณด๋ค ๊ตต์ ๊ตต๊ธฐ
- lighter - ์์๋ ๊ฐ๋ณด๋ค ์์ ๊ตต๊ธฐ
- number - ์ซ์๋ก ๊ตต๊ธฐ ์ง์ 100,200,300,400๊ณผ ๊ฐ์ ์ซ์๋ฅผ ์ด์ฉ
4. ๊ทธ์ธ ์์ฑ
text-transform
- uppercase ๋๋ฌธ์
- lowercase ์๋ฌธ์
- capitalize ๊ฐ ๋จ์ด์ ์ฒซ ๊ธ์๋ฅผ ๋๋ฌธ์๋ก
font-style
- normal
- italic
- oblique
text-align
- left
- right
- center
- justify : ๋ง์ง๋ง ์ค ์ ์ธํ๊ณ ์์ชฝ์ผ๋ก ์ ๋ ฌ
text-decoration
- none : ํจ๊ณผ ์ ๊ฑฐ
- line-through : ๊ธ์ ์ค๊ฐ์ ์ ์ถ๊ฐ
- overline : ๊ธ์ ์์ ์ ์ถ๊ฐ
- underline : ๋ฐ์ค ์ถ๊ฐ
๐ opacity
- ํฌ๋ช
๋ ์ง์
- ํฌ๋ช
๋๊ฐ ๋ค์ด๊ฐ ์์์์ ๋ด์ฉ๋ฌผ๋ ํจ๊ป ํฌ๋ช
ํด์ง
- 0.0-1.0 ์ฌ์ด ์ซ์ ์ง์
๐ color
1. ์์ ์ด๋ฆ
- ๋ค๋ฅธ ํํ ๋ฐฉ์์ ๋นํด ์๊ฐ ์ ํ์
<style>
.box {
background-color: orange;}
</style>
2. RGB๊ฐ
- 0~ 255์ ๊ฐ์ผ๋ก ํํ
<style>
.box {
background-color: RGB(102, 205,170)}
</style>
3. HEX๊ฐ (16์ง์)
- 16์ง์ 6์๋ฆฌ ์ฝ๋๋ก ์์์ ํํํ๋ ๋ฐฉ์
<style>
.box {
background-color: #F08080}
</style>