Index
Index1. Property์ Value1.1 Property์ Value1.2 ์ธ๊ณ์์ ๊ฐ์ฅ ๋ง์ด ์ฐ๋ Property1.3 Property์ Value์ ์ข
๋ฅ1.3.1 font-size1.3.2 margin1.3.3 padding1.3.4 color1.3.5 background-color1.3.6 width, height1.3.7 display1.3.8 font-family1.3.9 border1.3.10 font-weight
1. Property์ Value
1.1 Property์ Value
์ด์ property(์์ฑ)๊ณผ value(์์ฑ๊ฐ)์ ๋ํด ์์๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค. CSS์ ๊ธฐ์ด ์ฑํฐ์์ ๋ง์๋๋ ธ๋ฏ์ด, property๋ CSS์์ ์ง์ ํ๊ณ ์ถ์ ์คํ์ผ์ ์์ฑ ์ด๋ฆ์, value๋ ์์์ ๊ฐ์ ์๋ฏธํฉ๋๋ค. property๋ CSS์ ์ ํด์ง ๋ฌธ๋ฒ์ ๋ฐ๋ผ ์์ฑ๋์ด์ผ ํ๋ฉฐ, value๋ ์์ ๋กญ๊ฒ ์ฌ์ฉํ ์ ์์ต๋๋ค.
1.2 ์ธ๊ณ์์ ๊ฐ์ฅ ๋ง์ด ์ฐ๋ Property

์์ ๊ทธ๋ฆผ์ ๋ง์ดํฌ๋ก์ํํธ์์ ๊ฐ๋ฐํ bing์ด๋ผ๋ ๊ฒ์์์ง์ ํตํด ์์ง๋ ์ ์ธ๊ณ ์นํ์ด์ง์ ํต๊ณ์๋ฃ์
๋๋ค. ์๋ฃ์ ๋ฐ๋ฅด๋ฉด ๊ฐ์ฅ ๋น๋์๊ฐ ๋์ ์์ฑ์ ํ์ดํฌ๊ทธ๋ํผ, ๋ฐ์ค ๋ชจ๋ธ๋ก ์ ์๋์ด ์์ต๋๋ค.
ํ์ดํฌ๊ทธ๋ํผ๋ ์ฝ๊ฒ ๋งํด ๊ธ์(font)์ ๋ํ ๊ฒ์ ์๋ฏธํ๊ณ , ๋ฐ์ค ๋ชจ๋ธ์ ํ
์คํธ๋ค์ ๋ด๋ ๋ฐ์ค๋ฅผ ๋ปํฉ๋๋ค. ์์ ๋์จ Property ์์ธ ๋ด์ฉ์ ์ดํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
1.3 Property์ Value์ ์ข ๋ฅ
1.3.1 font-size

font๊ฐ ๋ถ์ property๋ ์ผ๋ง๋ ์์๊น์? ์ฐ์ p ํ๊ทธ๋ก ๊ฐ๋จํ๊ฒ ๋ฌธ์๋ฅผ ๋ง๋ค์ด ํฌ๋กฌ ๊ฐ๋ฐ์ ๋๊ตฌ๋ก ์ด์ด๋ณด์์ต๋๋ค.
์์ ์ ํ ๋ฒํผ์ ๋๋ฅด์ ๋ค์ hello world๋ฅผ ํด๋ฆญํ์๊ณ ๊ฐ๋ฐ์ ๋๊ตฌ์์ Computed๋ฅผ ํด๋ฆญํด์ฃผ์ธ์. ๊ทธ ๋ค์ Show all์ ๋๋ฅด๋ฉด ๊ฐ์ง ์ ์๋ property๊ฐ ๋ชจ๋ ๋์ต๋๋ค. ์ฌ๊ธฐ์ font๊ฐ ๋ถ์ property๋ฅผ ์ฐพ์๋ณด๊ฒ ์ต๋๋ค.

์ฌ๊ธฐ์ ๋ณด๋ค ๋ง์ ์ ๋ณด๋ฅผ ์ต๋ํ ์ ์์ต๋๋ค. 1.3.2๋ถํฐ๋ ํด๋น ์ฐฝ์ ์ด์ง ์์ ๊ฒ์
๋๋ค.
๋ฐ๋ก ์์๋ณผ ์ ์๋ property์ value๋ก๋ ๋ง์ ๊ณ ๋ ํฐํธ๋ฅผ ์ฌ์ฉํ๊ณ ์๊ณ size๋ 16px, font-weight์ 400์ด๊ตฐ์.
์ฌ๊ธฐ์ font-size๊ฐ ๊ฐ์ง ์ ์๋ value๋ ์๋์ ๊ฐ์ต๋๋ค. ๊ฐ๊ฐ์ Test๋ w3schools์์ ํ ์ ์์ต๋๋ค.(https://www.w3schools.com/cssref/playit.asp?filename=playcss_font-size&preval=medium)
- medium : ์น๋ธ๋ผ์ฐ์ ์์ ์ ํ ๊ธฐ๋ณธ ๊ธ์ํฌ๊ธฐ์ ๋๋ค.
- xx-small, x-small, small, large, x-large, xx-large : ์ด๋ฆ์์ ์ ์ ์๋ฏ์ด ๊ธฐ๋ณธ ๊ธ์ ํฌ๊ธฐ์์ ์์ ๊ฐ๋ถํฐ ํฐ ๊ฐ์ ์์ ๋๋ค.
- smaller, larger : ๋ถ๋ชจ ์์์ ์ํฅ์ ๋ฐ๋ ์๋์ ๊ธ์ ํฌ๊ธฐ์ ๋๋ค.
- length : px, cm ๋ฑ ๊ณ ์ ๋ ๊ธธ์ ๋๋ค.
- % : em, rem, % ๋ฑ ๊ฐ๋ณ ๊ธธ์ด์ ๋๋ค.
- initial : ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ ํฉ๋๋ค.
- inherit : ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
ย
ย
1.3.2 margin
margin์ ์๋์ ๊ฐ์ property๋ฅผ ๊ฐ์ง๋๋ค.
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
selector{ margin: 10px, 15px, 20px, 25px; }
์์ ๊ฒฝ์ฐ 12์๋ถํฐ 3์, 6์, 9์ ๋ฐฉํฅ์ผ๋ก ์ ์ฉ๋ฉ๋๋ค. ํ๋๋ง ๋ฃ์ ๊ฒฝ์ฐ 4๋ฐฉํฅ ๋ชจ๋ ์ ์ฉ๋๋ฉฐ 2๊ฐ๋ฅผ ๋ฃ์ ๊ฒฝ์ฐ ์ํ, ์ข์ฐ๊ฐ ์ ์ฉ๋ฉ๋๋ค.
selector{ margin: 10px, 20px, 25px; }
์์ ๊ฐ์ด ์ฌ์ฉํ์ค ๊ฒฝ์ฐ ์ง์ด ๋ง์ง ์์์ ์๋ํ์ง ์์ผ์ค ๊ฒ ๊ฐ์ง๋ง 10px์ top์ผ๋ก 20px์ ์ข์ฐ๋ก, 25px์ bottom์ผ๋ก ์ ์ฉ๋ฉ๋๋ค.
๋ง์ง์ value๋ก ์ค ์ ์๋ ๊ฐ์ ์๋์ ๊ฐ์ต๋๋ค. w3school์์ ์ค์ต(https://www.w3schools.com/cssref/playit.asp?filename=playcss_margin&preval=auto)ํด๋ณด์ค ์ ์์ต๋๋ค.
- length : px, cm ๋ฑ ๊ณ ์ ๋ ๊ธธ์ ๋๋ค.
- % : em, rem, % ๋ฑ ๊ฐ๋ณ ๊ธธ์ด์ ๋๋ค.
- initial : ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ ํฉ๋๋ค.
- inherit : ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
- auto : ๋ถ๋ชจ ์์์ ์ํ ๋ฐฉํฅ์ผ๋ก margin์ ์๋์ผ๋ก ๊ณ์ฐํฉ๋๋ค.
์ฌ๊ธฐ์ ์๋์ ๊ฐ์ด ์ฝ๋ฉํด๋ณด์๋ฉด ์ข์ฐ ๊ฐ์ด ์๋์ผ๋ก ๊ณ์ฐ๋์ด ์ค์ ์ ๋ ฌ ๋จ์ ๋ณด์ค ์ ์์ต๋๋ค.
<html> <head> <style> div { border: 10px solid blue; width: 200px; margin: auto; } </style> </head> <body> <div>hello world</div> </body> </html>
ย
1.3.3 padding
padding์ margin๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ก ์๋์ ๊ฐ์ property๋ฅผ ๊ฐ์ง๋๋ค.
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
๋ถ์ฌํ๋ ๋ฐฉ๋ฒ์ margin๊ณผ ๊ฐ์ผ๋ฏ๋ก ์๋ตํ๋๋ก ํ๊ฒ ์ต๋๋ค. ๋ค๋ง value๋ก ์ฌ ์ ์๋ ๊ฐ ์ค auto๋ ์์ต๋๋ค.
ย
1.3.4 color
color๊ฐ ๋ถ๋ ํ๋กํผํฐ๋ 4๊ฐ๊ฐ ์์ต๋๋ค. ์ฌ๊ธฐ์ background-color์ ๊ฐ์ด color๊ฐ ๋ค์ ๋ถ๋ ๊ฒ์ ์ ์ธํฉ๋๋ค.
- color : content์ ์์ ๋ํ๋ ๋๋ค. ๊ธ์์์ด๋ผ๊ณ ์๊ฐํ์๋ฉด ๋์ญ๋๋ค.
- color-interpolation
- color-interpolation-filters
- color-rendering
color๊ฐ ๊ฐ์ง ์ ์๋ value๋ ์๋์ ๊ฐ์ต๋๋ค.
- color : red, #000, #000000, rgb(0, 0, 0), rgba(100, 100, 100, 0.3), transparent
- initial : ์ด๊ธฐ ์ธํ ๊ฐ์ ๊ฐ์ ธ์ต๋๋ค.
- inherit : ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
color๊ฐ ๊ฐ์ง ์ ์๋ value์ ๋ํ ์์ธํ ๋ด์ฉ์ WEBDIR ์ฌ์ดํธ์ ๋ธ๋ก๊ทธ(https://webdir.tistory.com/406) ๊ธ์ ์ฐธ๊ณ ๋ฐ๋๋๋ค.
ย
1.3.5 background-color
background-color๋ ์๋์ ๊ฐ์ value๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค.
- color : red, #000, #000000, rgb(0, 0, 0), rgba(100, 100, 100, 0.3), transparent
- initialย : ์ด๊ธฐ ์ธํ ๊ฐ์ ๊ฐ์ ธ์ต๋๋ค.
- inheritย : ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
background-color์ ์์ญ์ border ์์ชฝ padding๊น์ง์
๋๋ค. border๋ ํฌํจํ์ง ์์ต๋๋ค.
ย
1.3.6 width, height
width, height๋ ์๋์ ๊ฐ์ value๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค.
- auto : ๊ธฐ๋ณธ ๊ฐ์ด ๋ค์ด๊ฐ๊ฒ ๋ฉ๋๋ค.
- length : px, cm ๋ฑ ๊ณ ์ ๋ ๊ธธ์ ๋๋ค.
- % : em, rem, % ๋ฑ ๊ฐ๋ณ ๊ธธ์ด์ ๋๋ค.
- initial : ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ ํฉ๋๋ค.
- inherit : ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
ย
1.3.7 display
display๋ ์์๋ฅผ ์ด๋ป๊ฒ ๋ณด์ฌ์ค์ง๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
- inline : ์ค๋ฐ๊ฟ์ด ๋์ง ์๊ณ , width์ height๋ฅผ ์ง์ ํ ์ ์์ต๋๋ค.
- block : width, height๋ฅผ ์ง์ ํ ์ ์์ผ๋ฉฐ, ํญ์ ์ค๋ฐ๊ฟ์ด ์ผ์ด๋ฉ๋๋ค.
- contents : ์ ํํ ์์์ ๋ด์ฉ ์์ด๋ ๋ค์ ์ฝํ ์ธ ๋ฅผ ๋ถ์ ๋๋ค.
- flex : ๋ ์ด์์์ ๋ค๋ฃฐ ๋ ํ๋์ ํ ๋๋ ์ด์ ๋ค๋ฃน๋๋ค. (1์ฐจ์ ๋ ์ด์์)
- grid : 2์ฐจ์ ๋ ์ด์์์ ์ค์ ํ๋๋ฐ ์ฌ์ฉํฉ๋๋ค.
- inline-block : block๊ณผ inline์ ์ค๊ฐ ํํ์ ๋๋ค. ๋ด๋ถ๋ block์ฒ๋ผ ํ์ํ์ฌ ๋ฐ์ค๋ชจ์์ด inline์ฒ๋ผ ์์ผ๋ก ๋์ด๋ฉ๋๋ค. ์ค๋ฐ๊ฟ์ด ๋์ง ์์ง๋ง, ํฌ๊ธฐ๋ฅผ ์ง์ ํ ์ ์์ต๋๋ค.
- inline-flex : inline level์์ flex๋ฅผ ๋ํ๋ ๋๋ค.
- inline-grid : inline level์์ grid๋ฅผ ๋ํ๋ ๋๋ค.
- inline-table : inline level์์ table์ ๋ํ๋ ๋๋ค.
- list-item : ๋ฆฌ์คํธ ํญ๋ชฉ์ ๋ํ๋ผ ๋ ์ฌ์ฉํฉ๋๋ค.
- run-in : ์ ํ์ ๋งฅ๋ฝ์ ํ์ ํด์ display๊ฐ์ ๊ฒฐ์ ํฉ๋๋ค. (๊ฐ๋ฐ์์ ์๋์ ๋ค๋ฅด๊ฒ ์๋ํ ์ ์์ด, ์ผ๋ฐ์ ์ผ๋ก ์ฌ์ฉ์ ๊ถ์ฅํ์ง ์์ต๋๋ค.)
- table : ํ๋ฅผ ๋ํ๋ผ ๋ ์ฌ์ฉํฉ๋๋ค.
- table-caption : ํ์ ์ ๋ชฉ์ ๋ํ๋ ๋๋ค.
- table-column-group : ํ๋ ์ด์์ ์ด(col)์ ๊ทธ๋ฃน์ผ๋ก ์ง๋๋ฐ ์ฌ์ฉํฉ๋๋ค.
- table-header-group : ์ด(col)์ ์ ๋ชฉ์ผ๋ก ๊ตฌ์ฑ๋, ํ๋ ์ด์์ ํ(row)์ ๊ทธ๋ฃน์ผ๋ก ์ง๋๋ฐ ์ฌ์ฉํฉ๋๋ค. ํ๋ฒ ๋ง ์ธ ์ ์์ต๋๋ค.
- table-footer-group : ์ด(col)์ ์์ฝ์ผ๋ก ๊ตฌ์ฑ๋, ํ๋ ์ด์์ ํ(row)์ ๊ทธ๋ฃน์ผ๋ก ์ง๋ ๋ฐ ์ฌ์ฉํฉ๋๋ค. ํ๋ฒ ๋ง ์ธ ์ ์์ต๋๋ค.
- table-row-group : ํ์ ๋ณธ๋ฌธ์ ํด๋นํ๋ ์์ญ์ ๋ํ๋ ๋๋ค. ์ฌ๋ฌ ๋ฒ ์ ์ธ๋์ด ํ์ ๊ทธ๋ฃนํํ ์ ์์ต๋๋ค.
- table-cell : ํ์ ์ ์ ๋ปํฉ๋๋ค.
- table-column : ํ์ ์ด(col)์ ๋ปํฉ๋๋ค.
- table-row : ํ์ ํ(row)์ ๋ปํฉ๋๋ค.
- none : ์์๋ฅผ ์์ ํ ์ ๊ฑฐํฉ๋๋ค.
- initial : ๋ถ๋ชจ์ ์์ฑ์ ์์๋ฐ์ง ์๊ณ , ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ด๊ธฐํํฉ๋๋ค.
- inherit : ๋ถ๋ชจ์ ์์ฑ์ ์์ ๋ฐ์ต๋๋ค.
ย
1.3.8 font-family
- family-name : ๊ถ์, ๊ตด๋ฆผ, arial๊ฐ์ ๊ธ๊ผด ์ด๋ฆ์ ์ฌ์ฉํฉ๋๋ค. ์ง์ ํ ๊ธ๊ผด์ด ์ฌ์ฉ์์ ์ปดํจํฐ์ ์ค์น๋์ด ์์ง ์์ ๊ฒฝ์ฐ, ๊ธ๊ผด์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ํ์๋ฉ๋๋ค.
- initial : ๋ถ๋ชจ์ ์์ฑ์ ์์๋ฐ์ง ์๊ณ , ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ด๊ธฐํํฉ๋๋ค.
- inherit : ๋ถ๋ชจ์ ์์ฑ์ ์์ ๋ฐ์ต๋๋ค.
Web font (https://fonts.google.com/)
font-family์์ ๋ง์๋๋ ธ๋ฏ์ด ์ง์ ๊ธ๊ผด์ด ์ค์น๋์ง ์์ ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ํ๊ธฐ๋ฉ๋๋ค. ์ด ๋ web fonts๋ฅผ ์ฌ์ฉํ๋ฉด ์ฌ์ฉ์์ ์ปดํจํฐ์ ์ค์น๋์ด ์์ง ์์ ๊ธ๊ผด์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
web fonts๋ ์ํ๋ font๊ฐ ์๋ ๊ณณ์ผ๋ก ์ฐ๊ฒฐํ์ฌ, ์ธ๋ถ ์คํ์ผ์ ๋ถ๋ฌ์์ ์ฌ์ฉํ๋ ๋ฐฉ์์ ์ฑํํ๊ณ ์์ต๋๋ค. ์ ๋ช
ํ web fonts๋ก๋ google font๊ฐ ์์ต๋๋ค.
์ฌ์ฉ๋ฐฉ๋ฒ์ ์๋ ์ฝ๋๋ฅผ ์ฐธ๊ณ ํ์๊ธธ ๋ฐ๋๋๋ค.
// ์ฌ์ฉ์์1 : href ์ฐธ๊ณ <head> <link href = 'http://fonts.googleapis.com/css?family=Open+Sans:400.300' rel='stylesheet' type='text/css'> <style type = "text/css"> h1 {font-family: 'Open Sans', sans-serif;}</style> </head>
// ์ฌ์ฉ์์2 : url ์ฐธ๊ณ <style type = "text/css"> @import url(http://fonts.googleapis.com/css?family=Open+Sans:400.300); h1 {font-family: 'Open Sans', sans-serif;} </style>
ย
ย
1.3.9 border
border๋ ์๋์ ๊ฐ์ property๋ฅผ ๊ฐ์ง๋๋ค.
- border-width - ์ ์ ๋๊ป์ ๊ด๋ จ๋ ์์ฑ์ ๋๋ค.
- border-style - ์ ์ ๋ชจ์๊ณผ ๊ด๋ จ๋ ์์ฑ์ ๋๋ค.
- border-color - ์ ์ ์๊น๊ณผ ๊ด๋ จ๋ ์์ฑ์ ๋๋ค.
- initial - ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ ํฉ๋๋ค.
- inherit - ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
ย
์์ ๊ฐ์ ์์ฑ์ ์๋ ์ฝ๋ ์์๋ก ์์ฑํ์๋ฉด ๋ฉ๋๋ค.
border: border-width border-style border-color | initial | inherit
ย
border-width๋ถํฐ ํ๋์ฉ ์์ธํ ์ค๋ช
๋๋ฆฌ๊ฒ ์ต๋๋ค.
ย
๋จผ์ border-width๋ ์๋์ ๊ฐ์ ๋ฐฉ๋ฒ์ผ๋ก ์ค์ ์ ์ง์ ํ ์ ์์ต๋๋ค.
- px - ์์ฑ ๊ฐ์ ์ง์ ํฝ์ ๋จ์๋ก ์ง์ ํฉ๋๋ค.
- medium - ์ค๊ฐ ๊ตต๊ธฐ๋ก ํ์๋ฉ๋๋ค.
- thin - ์ค์ ์ผ๋ก ํ์๋ฉ๋๋ค.
- thick - ๊ตต์ ์ ์ผ๋ก ํ์๋ฉ๋๋ค.
ย
๋ค์์ผ๋ก border-style์ ์ค๋ช
๋๋ฆฌ๊ฒ ์ต๋๋ค. ์ ์ ํํ๋ ์ค์ , ์ ์ , ํ์ ๋ฑ ๋ค์ํ๊ฒ ์ค์ ํ ์ ์์ผ๋ฉฐ ์์ ์์จ ์๋ ์์ต๋๋ค.
- none - ์ ์ ์์ฑ๋๋ค.
- solid - ์ค์ ์ ๋๋ค.
- dotted - ์ ์ ์ ๋๋ค.
- dashed - ํ์ ์ผ๋ก ๋ฐ๋์ง์ ๊ณผ ๊ฐ์ ์ ์ ๋๋ค.
- double - ์ด์ค์ ์ ๋๋ค.
- groove - ์ ์ด ์์ชฝ์ผ๋ก ํ์ธ ์ ์ ๋๋ค.
- ridge - ๋ณผ๋กํ๊ฒ ์ ์ฒด๊ฐ์ด ์๋ ์ ์ ๋๋ค.
- inset - ํ ๋๋ฆฌ๊ฐ ์ ์ฒด์ ์ผ๋ก ์์ผ๋ก ๋ค์ด๊ฐ ๋ณด์ด๋ ํํ์ ๋๋ค.
- outset - inset์ ๋ฐ๋์ ๋๋ค.
ย
๋ง์ง๋ง์ border-color์
๋๋ค. ์๊น์ ์ข
๋ฅ์ ๋ํด์๋ ๋ง์ด ์์๊ธฐ๋๋ฌธ์ ํ
๋๋ฆฌ top, bottom, left, right์ ์๊น์ ์ฃผ๋ ๋ฐฉ๋ฒ์ ๋ํด์ ์๋ ค๋๋ฆฌ๊ฒ ์ต๋๋ค.
[1] border-color: red; [2] border-color: red green; [3] border-color : red green blue; [4] border-color : red green blue yellow;
[1]๊ณผ ๊ฐ์ด ํ ๊ฐ์ ๊ฐ์ ์ฌ์ฉํ๋ฉด ๋ค ๋ฉด์ ๋์ผํ ์์์ด ์ ์ฉ๋ฉ๋๋ค.
[2]์ ๊ฐ์ด ๋ ๊ฐ์ ๊ฐ์ ์ฌ์ฉํ๋ฉด (top bottom), (left right)์ ์ ์ฉ๋ฉ๋๋ค.
[3]๊ณผ ๊ฐ์ด ์ธ ๊ฐ์ ๊ฐ์ ์ฌ์ฉํ๋ฉด (top), (left right), (bottom)์ ์ ์ฉ๋ฉ๋๋ค.
[4]์ ๊ฐ์ด ๋ค ๊ฐ์ ๊ฐ์ ์ฌ์ฉํ๋ฉด top, right, bottom, left์ ์ ์ฉ๋ฉ๋๋ค.
ย
์ง์ ํ
๋๋ฆฌ์ ์ค์ ์ ๋ฃ๋์ฝ๋์์ ์ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์ฌ๋๋ฆฌ๊ณ ํ
๋๋ฆฌ๋ ๋ง๋ฌด๋ฆฌํ๊ฒ ์ต๋๋ค.
<!doctype html> <html> <head> <style type="text/css"> div { margin: 10px 0px; font-size: 13px; } .one { border: 4px ridge red; } .two { border: thick solid green; } .three { border: thin dotted blue; } .four { border: medium inset; border-color: yellow green } </style> </head> <body> <div class="one"> <p> border: 4px none red;</p> </div> <div class="two"> <p>border: thick solid green;</p> </div> <div class="three"> <p>border: thin dotted blue;</p> </div> <div class="four"> <p>border: medium inset; <br> border-color: yellow green</p> </div> </body> </html>
ย

1.3.10 font-weight
font-weight๋ ๊ธ์ ๊ตต๊ธฐ๋ฅผ ์ค์ ํ๋ ์์ฑ์
๋๋ค.
- normal - ๊ธฐ๋ณธ๊ฐ์ด๋ฉฐ ๋ณดํต ๊ตต๊ธฐ์ ๋๋ค.
- bold - ๊ตต์ ๊ตต๊ธฐ์ ๋๋ค.
- bolder - ์์๋ ๊ฐ๋ณด๋ค ๊ตต์ ๊ตต๊ธฐ์ ๋๋ค.
- lighter - ์์๋ ๊ฐ๋ณด๋ค ์์ ๊ตต๊ธฐ์ ๋๋ค.
- number- ์ซ์๋ก ๊ตต๊ธฐ๋ฅผ ์ง์ ํ๋ฉฐ 100,200,300,400๊ณผ ๊ฐ์ ์ซ์๋ฅผ ์ด์ฉํฉ๋๋ค.
- initial- ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ ํฉ๋๋ค.
- inherit- ๋ถ๋ชจ ์์์ ์์ฑ๊ฐ์ ์์๋ฐ์ต๋๋ค.
ย
๊ตต๊ธฐ๊ฐ ๋์ผํ๋๋ผ๋ ๊ธ์์ฒด์ ๋ฐ๋ผ์ ์ฐจ์ด๊ฐ ๋ ์ ์์ต๋๋ค. ์ด ์ ์ ์ํ๋ฉฐ ์์๋ฅผ ๋ณด์ฌ๋๋ฆฌ๊ณ ๋ง๋ฌด๋ฆฌํ๋๋กํ๊ฒ ์ต๋๋ค!
<!doctype html> <html> <head> <meta charset="utf-8"> <style> font { } .weight-normal { font-weight: normal; } .weight-bold { font-weight: bold; } .weight-100 { font-weight: 100; } .weight-900 { font-weight: 900; } </style> </head> <body> <font> <p class="weight-normal">font-weight normal</p> <p class="weight-bold">font-weight bold</p> <p class="weight-100">font-weight 100</p> <p class="weight-900">font-weight 900</p> </font> </body> </html>

ย