°³Ã¼ ¼ÓÀÇ ÅؽºÆ®¿¡ »ç¿ëµÇ´Â ±Û²ÃÀÇ ±½±â¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
normal | µðÆúÆ®À̸ç, º¸ÅëÀÇ ±Û²ÃÀÌ´Ù. |
bold | ±½°Ô Ç¥ÇöÇÑ ±Û²ÃÀÌ´Ù. |
bolder | º¸Å뺸´Ù ÇÑ´Ü°è ±½Àº(bold) ±Û²ÃÀÌ´Ù. |
lighter | º¸Å뺸´Ù ÇÑ´Ü°è ¾ãÀº(lighter) ±Û²ÃÀÌ´Ù. |
100 | °¡Àå ¾ãÀº ±Û²ÃÀÌ´Ù. |
200 | |
300 | |
400 | Á¤»óÀûÀÎ ±Û²ÃÀÌ´Ù. µðÆúÆ®°ª¿¡ ÇØ´çµÈ´Ù. |
500 | |
600 | |
700 | ±½°Ô Ç¥ÇöÇÑ ±Û²ÃÀÌ´Ù. |
800 | |
900 | °¡Àå ±½Àº ±Û²ÃÀÌ´Ù. |
ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº normalÀÌ´Ù.
CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÈ´Ù.
font-weight °ª¿¡ ´ëÇÑ Å°¿öµå´Â »ç¿ëÀÚ ÄÄÇ»ÅÍ¿¡ ¼³ÀúµÈ ³»¿ë¿¡ µû¶ó ´Ù¸¦ ¼ö ÀÖ´Ù. ¸¹Àº °æ¿ì, ½Ã½ºÅÛÀÌ °¡Àå °¡±î¿î ÀÏÄ¡¸¦ ¼±ÅÃÇϹǷÎ, font-weight ¼³Á¤¿¡ µû¶ó ±× Â÷À̸¦ °¨ÁöÇÏÁö ¸øÇÑ´Ù.
font-weight 400À¸·Î ¼³Á¤ÇÏ´Â °ÍÀº µðÆúÆ®°ªÀÎ normal¿¡ ÇØ´çÇÏ°í, 700Àº bold¿¡ ÇØ´çÇÑ´Ù. bolder ³ª lighter´Â ¸ðü °³Ã¼ÀÇ ±ÛÀÚ ±½±â¿¡ »ó´ëÀûÀÎ font-weightÀÌ´Ù. ¸ðüÀÇ ±Û²Ã ±½±â°¡ º¸ÅëÀÎ °æ¿ì bolder¸¦ ¼³Á¤Çϸé bold¿Í °°¾ÆÁø´Ù.
IE4.0Àº normal°ú bold¸¸ Áö¿øÇÑ´Ù.
IE3.0Àº font ¾ÖÆ®¸®ºäÆ®¸¦ ÅëÇÏ¿© font-weight¸¦ ¼³Á¤ÇÑ´Ù.
°³Ã¼ | script | CSS | IE ¹öÀü |
---|
ÀÌ ¼Ó¼ºÀº CSS1(Cascading Style Sheets, Level 1)¿¡¼ Á¤ÀǵǾú´Ù.
<DIV id=divO1Obj style=font-weight:bold onmouseover="showA.innerText=this.id;showB.innerText=this.style.fontWeight">divO1Obj.style.fontWeight:bold</DIV> <DIV id=divO2Obj style=font-weight:bolder onmouseover="showA.innerText=this.id;showB.innerText=this.style.fontWeight">divO2Obj.style.fontWeight:bolder</DIV> <DIV id=divO3Obj style=font-weight:lighter onmouseover="showA.innerText=this.id;showB.innerText=this.style.fontWeight">divO3Obj.style.fontWeight:lighter</DIV> <DIV id=divO4Obj onmouseover="showA.innerText=this.id;showB.innerText=this.currentStyle.fontWeight">divO4Obj.currentStyle.fontWeight= <SCRIPT>document.write(divO4Obj.currentStyle.fontWeight)</SCRIPT></DIV> <SCRIPT> str=''; for (i=1;i<10;i++){ str+='<DIV id=div'+i+'Obj style="font-weight:'+i+'00" '; str+=' onmouseover="showA.innerText=this.id;showB.innerText=this.style.fontWeight">div'+i+'Obj.fontWeight:'+i+'00</DIV>'; } document.write(str); </SCRIPT> <DIV style="border:solid 1 blue;background:ffe"><SPAN id=showA> </SPAN>.style.fontWeight= <SPAN id=showB> </SPAN></DIV>