CSS ¸Å´º¾ó ¹Ú½º(box) Ư¼º |
¼Ò°³ | ÀÏ¹Ý | ÅؽºÆ® | ÆùÆ® | ¹Ú½º | »ö»ó | ¸ñ·Ï | »öÀÎ | ¿¹Á¦ |
¹Ú½º(box)¶õ À̹ÌÁö, µµÇü, ±ÛÀÚµéÀÇ ¸ðÀ½Ã¼¸¦ ¸»ÇÑ´Ù. p, table, ol, ul, img, input, textarea, select¿Í object µîÀÌ Æ÷ÇÔ µÈ´Ù. border´Â ÈÄ·¹ÀÓ Å׵θ®¸¦ ¸» ÇÔ. paddingÀº ÈÄ·¹ÀÓ°ú ³»¿ë¹°°úÀÇ °ø¹éÀ» ¸» ÇÔ. (HTML ±Ô°Ý border, padding, margin Â÷ÀÕÁ¡ ¼³¸í ) marginÀº ¶³¾îÁø °ø¹éÀÇ Å©±â¸¦ ¸» ÇÔ. ¸ÕÀú °øÅë»çÇ×À» ±â¼úÇÏ°í ±×ÈÄ Æ¯Á¤ ÁöÁ¤Çϸé, µ¤¾î¾º¿ì±â¸¦ ÇÏ¿© ¸¶Áö¸· ÁöÁ¤ÀÌ Àû¿ë µÈ´Ù. ¾Æ·¡ CSS1 ¼³¸íÀº ½ºÆäÀ̽º °ü°è·Î '±Ô°Ý'À¸·Î ¿¬°á½ÃÄ×´Ù. |
|||||||
margin-top: | margin-bottom: | margin-left: | margin-right: | ||||
±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ||||
ul {margin-top: 0.5in;} | ul {margin-bottom: 0.5in;} | p {margin-left: 3em;} | img {margin-right: 30px;} | ||||
margin: °øÅë ±Ô°Ý |
h1 {margin: 2ex;} div {margin: 3px 4px 5px 6px } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤ |
||||||
| |||||||
padding-top: | padding-bottom: | padding-left: | padding-right: | ||||
±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ||||
ul {padding-top: 0.5in;} | ul {padding-bottom: 0.5in;} | p {padding-left: 3em;} | img {padding-right: 30px;} | ||||
padding: °øÅë ±Ô°Ý |
h1 {padding: 2ex;} div {padding: 3px 4px 5px 6px } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤ |
||||||
|
|||||||
border-top-width: | border-bottom-width: | border-left-width: | border-right-width: | ||||
±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ||||
ul {border-top-width: 0.5in;} | ul {border-bottom-width: 0.5in;} | p {border-left-width: 3em;} | img {border-right-width: 30px;} | ||||
border-width °øÅë ±Ô°Ý |
h1 { border-width: 2px 3px } div {border-width: 3px 4px 5px 6px } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤ |
||||||
| |||||||
border-top: | border-bottom: | border-left: | border-right: | ||||
±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ±Ô°Ý | ||||
ul {border-top: 0.5in solid black;} | ul {border-bottom: 0.5in grooved green;} | p {border-left: 3em solid gray;} | img {border-right: 30px dotted blue;} | ||||
border: °øÅë ±Ô°Ý |
h1 {border: 2px;} a:visited { border: thin dotted #800080 } |
||||||
|
|||||||
border-color: |
borderÀÇ »ö»ó¸¦ ÁöÁ¤ ÇÑ´Ù.(»ö»óÇ¥) color, rgb number »ç¹æÀÇ length, style, color¸¦ µ¿ÀÏÇÏ°Ô ¸¸ ÁöÁ¤µÈ´Ù. h1 {border-color: purple; border-style: solid;} div {border-color: ffffff red blue yellow } À§, ¿ì, ÇÏ, Á ½Ã°è¹æÇâÀ¸·Î ÁöÁ¤ |
||||||
border-style: |
borderÀÇ Æ¯¼ºÀ» ÁöÁ¤ ÇÑ´Ù. none, dotted, dashed, solid, double, groove, ridge, inset, outset h1 {border-color: purple; border-style: solid;} |
||||||
width: ±æÀÌ, ¹éºÐÀ², auto |
Æø(width)¸¦ ÁöÁ¤ÇÑ´Ù. À½¼ö´Â Çã¿ëµÇÁö ¾Ê´Â´Ù. À̹ÌÁö Æø ÁöÁ¤¿¡ ¸¹ÀÌ »ç¿ë´Âµ¥ ´Ù¸¥ block ¿¡¼µµ »ç¿ë µÈ´Ù. table {width: 80%;} | ||||||
height: ±æÀÌ, auto |
³ôÀÌ(height)¸¦ ÁöÁ¤ÇÑ´Ù. img.icon {height: 50px;} |
||||||
float: left, right, none |
¿¤·¹¸àÆ®°¡ ¿òÁ÷ÀÌ´Â(float) °ÍÀ» ÁöÁ¤ÇÑ´Ù.
html¿¡¼ <align=left>¿Í °°Àº ±â´ÉÀÌ´Ù,
ÀϹÝÀûÀ¸·Î ÅؽºÆ® À̹ÌÁö¿¡ »ç¿ëÇϳª
´Ù¸¥ ¿¤·¹¸àµå¿¡µµ »ç¿ë ÇÒ ¼ö ÀÖ´Ù.
img {float: left;} |
||||||
clear: left, right, both, none |
html¿¡¼ <br clear=left/right/all/none>°ú ºñ½Á
float ¿¤·¹¸àÆ®¿¡¼ ÀÛµ¿ ÁöÁ¤
h1 {clear: both;}
h1 {clear: left;} h1 ¹®ÀÚ´Â left¸¦ ÇÇÇؼ ³ªÅ¸³²
| ||||||
<STYLE type="text/css">
.box1 { color:blue; background:#cfffff; line-height:12pt;
font-family: ±¼¸²; font-size: 10pt; font-weight: bold; font-style: normal;
margin-left: 20px;
padding-top:1; padding-bottom:6; padding-left:11; padding-right:16;
border-color: #aaffee #006600 #ff6600 #eeffaa; border-style:solid;
border-top-width:16; border-bottom-width:12;
border-left-width:8; border-right-width: 20;
}
</STYLE>
<table border=1 width=68% class=box1>
<tr><td>test of ÅؽºÆ®</td>
<td>and ¹Ú½º together</td></tr>
<tr><td>¹ÛÀº border</td>
<td>¾ÈÀº padding</td></tr>
</table>
|
|