°³Ã¼ÀÇ Å׵θ®(border) »ö»óÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
cssSelector : (½ºÅ¸ÀÏ ¼±ÅÃÀÚ)
¼Ó¼ºÀ» °¡Áú¼ö ÀÖ´Â ¿¤·¹¸àÆ®()³ª Ŭ¶ó½º(class) À̸§ ȤÀº ÀνÄÀÚ(id)ÀÌ´Ù.

: (¼Ó¼º ¹®ÀÚ¿­)
½ºÅ¸ÀÏ ¼Ó¼ºÀº °³Ã¼ÀÇ Å׵θ®(border) »ö»óÀ» ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

»ö»óÇ¥ÀÇ »ö»ó¸íÀ̳ª RGB »ö»ó°ªÀÌ´Ù.

ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼­´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼­´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº ¾ø´Ù.

CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÇÁö ¾Ê´Â´Ù.

Ư±â

ÀÌ ¼Ó¼ºÀº ³×°¡Áö °ªÀ» Çѹø¿¡ ¼³Á¤Çϰųª ¹ÝȯÇÒ ¼ö ÀÖ´Â º¹ÇÕ Ãà¾à ¼Ó¼ºÀÌ´Ù.
³×°¡Áö ¼Ó¼ºÀÇ ¼ø¼­´Â top, right, botttom, leftÀÌ´Ù.

IE5.5¿¡¼­ ÀÌ ¼Ó¼ºÀº ÀζóÀÎ ¿¤·¹¸àÆ®¿¡ Àû¿ëµÈ´Ù. ÀÌÀü ¹öÀü¿¡¼­´Â ÀζóÀÎ ¿¤·¹¸àÆ®´Â position ¼Ó¼º°ªÀÌ absoluteÀ̰ųª ÀÌ ¼Ó¼ºÀ» ÀÌ¿ëÇÏ¿© ¹èÄ¡µÇ¾î¾ß ÇÑ´Ù. height³ª width ¼Ó¼ºÀÇ ¼³Á¤µÈ °ª¿¡ ÀÇÇÏ¿© ¿¤·¹¸àÆ®ÀÇ ¹èÄ¡°¡ °áÁ¤µÈ´Ù.

borderStyle ¼Ó¼ºÀÌ noneÀ¸·Î ¼³Á¤µÇ¾î ÀÖÀ¸¸é borderColor ¼Ó¼ºÀº Ç¥ÇöµÇÁö ¾Ê´Â´Ù.

ÀϺΠºê¶ó¿ìÀú¿¡¼­ »ö»óÀ̸§À» ÀνÄÇÏÁö ¸øÇÒ ¼ö ÀÖÁö¸¸, ¸ðµç ºê¶ó¿ìÀú´Â RGB »ö»óÀº ÀνÄÇÏ°í ¿Ã¹Ù¸£°Ô µð½ºÇ÷¹ÀÌÇÏ¿©¾ß ÇÑ´Ù.

Àû¿ë
°³Ã¼scriptCSS IE ¹öÀü
ÂüÁ¶
border borderColor borderBottomColor borderLeftColor borderRightColor borderTopColor

ÀÌ ¼Ó¼ºÀº CSS1(Cascading Style Sheets, Level 1)¿¡¼­ Á¤ÀǵǾú´Ù.



°á°ú Ç¥½Ãâ
<STYLE>
.border1Class { border:10px;border-style:solid;border-color:pink }
.border2Class { border:10px;border-style:solid;border-color:pink red }
.border3Class { border:10px;border-style:solid;border-color:pink red blue }
.border4Class { border:10px;border-style:solid;border-color:pink red blue green }
.border5Class { border:10px dashed pink }
.noborderClass { border:none;border-color:red }
button {width:110;margin:2}
</STYLE>
<SCRIPT>
function showAll(){
  str='tdObj.className='+tdObj.className+'<BR>';
  str+='tdObj.currentStyle.borderWidth='+tdObj.currentStyle.borderWidth+'<BR>';
  str+='tdObj.currentStyle.borderStyle='+tdObj.currentStyle.borderStyle+'<BR>';
  str+='tdObj.currentStyle.borderColor='+tdObj.currentStyle.borderColor+'<BR>';
  showA.innerHTML=str;
}
</SCRIPT>
<TABLE border cellspacing=5 width=100%>
<TR>
<TD id="tdObj"><IMG src="../../gif/flower.jpg" width="300"></TD>
</TR>
</TABLE>
<BUTTON onclick="tdObj.className='border1Class';showAll()">border1Class</BUTTON>
<BUTTON onclick="tdObj.className='border2Class';showAll()">border2Class</BUTTON>
<BUTTON onclick="tdObj.className='border3Class';showAll()">border3Class</BUTTON><BR>
<BUTTON onclick="tdObj.className='border4Class';showAll()">border4Class</BUTTON>
<BUTTON onclick="tdObj.className='border5Class';showAll()">border5Class</BUTTON>
<BUTTON onclick="tdObj.className='noborderClass';showAll()">noborderClass</BUTTON>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>