* ์ (RGB)
CSS์์ ์ ํํ๋ฒ์ ์ฌ๋ฌ๊ฐ์ง๊ฐ ์์ง๋ง, ์ผ๋ฐ์ ์ธ ๋ฐฉ๋ฒ์ RGB(๋นจ๊ฐ, ํ๋, ์ด๋ก์ ๋น์จ)๋ก ๋ํ๋ด๋ ๋ฐฉ๋ฒ์
๋๋ค.
color - property (์์ฑ)
div{
color: ํ
์คํธ ์;
background-color : ๋ฐฐ๊ฒฝ์
border_color :ํ
๋๋ฆฌ ์
}
16์ง์ ํํ๋ฒ (hex)
#RR GG BB
๊ฐ ์ฑ๋ถ (R,G,B)๋ 8๋นํธ(0๋ถํฐ 255)์ ์ ์์ด๋ฉฐ, ์ด๊ฒ์ 16์ง์๋ก ๋ฃ์ด ๋ํ๋
๋๋ค.
ex ) #FF0000 : ๋นจ๊ฐ์ , #00FF00 : ์ด๋ก์ , #0000FF ํ๋์
|
div{color : #2A2BFF;}
10์ง์ ํํ๋ฒ
rgb(Red,Green,Blue)
๋ง์ฐฌ๊ฐ์ง๋ก 0๋ถํฐ 255์ ์๋ฅผ 10์ง์๋ก ๋ฃ์ด์ฃผ๋ฉด ๋ฉ๋๋ค.
|
p{color : rgb(121,23,59;)}
์ ์ด๋ฆ ํํ๋ฒ
์์ ์ด๋ฆ์ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์
๋๋ค.
blue, black, lime, gold ...................... ๋ฑ๋ฑ
body{color : gold;}
* ํ
์คํธ
html๋ก ํ
์คํธ๋ฅผ ์์ฑํ๊ณ , CSS๋ก ํ
์คํธ์ ์ ๋ ฌ ํํ, ๋ฌธ๋จ์ ๋ค์ฌ์ฐ๊ธฐ ๋ฐ ๋ฐ์ฝ๋ ์ด์
๋ฑ์ ํ ์ ์์ต๋๋ค.
ํ
์คํธ์ ์ ๋ ฌ
h1{text-align : right;}
์์ฑ๊ฐ : left, right, center, justify
๋ธ๋ก์์ ์์ ์ธ๋ผ์ธ์์๋ฅผ ์ ๋ ฌํ๋ ํ๋กํผํฐ์
๋๋ค.
๋ฐ์ฝ๋ ์ด์
div{text-decoration : underline;}
์์ฑ๊ฐ : underline, ocerline, line_through
๋ค์ฌ์ฐ๊ธฐ
strong{text-indent : 3em;}
1em : ํ๊ธ์ ๋ค์ฌ์ฐ๊ธฐ, 2em : ๋๊ธ์ ๋ค์ฌ์ฐ๊ธฐ.
*em์ ๋ฐฐ์๋ฅผ ์๋ฏธํ๋ค. ex ) font-size : 3em; ์ ํ์ฌ ํฐํธ์ 3๋ฐฐํฌ๊ธฐ ๋ฅผ ๋ํ๋
๋๋ค.
* ํฐํธ
ํฐํธ ํฌ๊ธฐ
body{font-size : large}
์๋๊ฐ : xx-small, x-small, small, medium , large, x-large, xx-large, ( smaller, larger )
์ ๋๊ฐ : 10px (ํฝ์
)
๋ฌธ์์ ํฌ๊ธฐ ์กฐ์ ์, ๊ธ์ํฌ๊ธฐ๊ฐ ๊ณ ์ ๋ ํํ๋ก ์ถ๋ ฅ๋์ง ์์ ๊ฒฝ์ฐ๊ฐ ์๊ธฐ๋๋ฌธ์ ์๋๊ฐ์ ์ด์ฉํ๋๊ฒ ๋ ๋ฐ๋์งํ๋ค๊ณ ํฉ๋๋ค.
ํฐํธ ๊ตต๊ธฐ
h3{font-weight : bold;}
100~900์ฌ์ด์ ์ซ์๋ฅผ ์
๋ ฅํด๋ ๋ฉ๋๋ค. (900์ด ์ต๋ ๊ตต๊ธฐ)
* ๋ฐ์ค ๋ชจ๋ธ (box model)
css๋ html ์์๋ฅผ 4๊ฐ์ง์ ๋ฐ์ค๋ก ์ธ์ํ๋ค.
์ฝํ
์ธ (contents) : ํ
์คํธ, ์ด๋ฏธ์ง.
ํจ๋ฉ(padding) : ์ฝํ
์ธ ์ ํ
๋๋ฆฌ ์ฌ์ด์ ๊ณต๊ฐ(์ฌ๋ฐฑ).
ํ
๋๋ฆฌ(border) : ํจ๋ฉ ์ธ๋ถ์ ์ธ๊ณฝ์ .
์ฌ๋ฐฑ(margin) : ๊ฐ์ฅ ๋ฐ๊นฅ ๋ถ๋ถ.