CSS »ç¿ë¹ý
CSS ¹®¹ý
Ŭ·¡½º¿Í ¾ÆÀ̵ð
ÁÖ¼®
ÅؽºÆ®
color
direction
backgroud-color
line-height
letter-spacing
text-align
text-decoration
text-indent
word-spacing
¹è°æ
background-color
background-image
background-repeat
background-position
background-attachment
Font
Å©±â ´ÜÀ§
Box Model
°æ°è¼±(border)
¸®½ºÆ®(list)
Box Model - Margins, padding and borders

°¢°¢ÀÇ ¿¤¸®¸ÕÆ®¸¦ ¹®¼­¿¡ ¹èÄ¡Çϱâ À§Çؼ­´Â Box Model À̶ó°í ºÎ¸£´Â margin, padding ±×¸®°í border ¼Ó¼ºÀ» ÀüüÀûÀ¸·Î ÀÌÇØÇØ¾ß ÇÕ´Ï´Ù.

À§ÀÇ ±×¸²¿¡¼­ Áß¿äÇÑ 4°¡Áö´Â content, padding, border, margin ÀÔ´Ï´Ù.

  1. content : ¼ø¼öÇÑ ÄÜÅÙÃ÷
  2. padding : ÄÜÅÙÃ÷¿Í °æ°è¼± »çÀÌÀÇ ¿©¹é
  3. border : °æ°è¼±
  4. margin : °æ°è¼± ¹Û¿¡¼­ ¹Ú½º¸ðµ¨ÀÇ ÃÖÁ¾ °æ°è¼±±îÁöÀÇ ¿©¹é

<table width="300" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
 <td bgcolor="#EEEEEE">
  <div style="padding:10px; margin:10px; border:1px gray solid;">Box ModelÀ» ¼³¸íÇϱâ À§ÇÑ ¿¹Á¦</div>
 </td>
</tr>
</table>

ÀÌ ¿¹Á¦¿¡¼­ padding°ª°ú margin°ªÀ» º¯°æÇØ º¸¸é ÀÌ °ªÀÌ ¾î¶² ºÎºÐÀ» ÀǹÌÇÏ´ÂÁö ÀÌÇØÇÒ ¼ö ÀÖ½À´Ï´Ù.

Box ModelÀ» ¼³¸íÇϱâ À§ÇÑ ¿¹Á¦

Copyright © Homejjang.com All rights reserved.