°³Ã¼ ¼Ó¿¡¼ ÅؽºÆ®ÀÇ Á¤·Ä ¹æ½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
left | µðÆúÆ®À̸ç, ÅؽºÆ®´Â ¿ÞÂÊ¿¡ Á¤·ÄµÈ´Ù. |
right | ÅؽºÆ®´Â ¿À¸¥ÂÊ¿¡ Á¤·ÄµÈ´Ù. |
center | ÅؽºÆ®´Â Áß¾Ó¿¡ Á¤·ÄµÈ´Ù. |
justify | ÅؽºÆ®´Â ¹èºÐµÇ¾î Á¤·ÄµÈ´Ù. |
ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº leftÀÌ´Ù.
CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÈ´Ù.
ÀÌ ¼Ó¼ºÀº ºí·° ¿¤·¹¸àÆ®¿¡ Àû¿ëµÈ´Ù.
ÀÌ ¼Ó¼ºÀº div °³Ã¼ ¼ÓÀÇ ¸ðµç ºí·° °³Ã¼µé¿¡ »ó¼ÓµÈ´Ù.
¼Ó¼ºÀÌ ÁöÁ¤µÇÁö ¾Ê¾ÒÀ¸¸é nullÀÌ ¹ÝȯµÈ´Ù.
IE4.0¿¡¼ justify ¼Ó¼º°ªÀÌ °¡´ÉÇÑ´Ù.
°³Ã¼ | script | CSS | IE ¹öÀü |
---|
ÀÌ ¼Ó¼ºÀº CSS1(Cascading Style Sheets, Level 1)¿¡¼ Á¤ÀǵǾú´Ù.
<STYLE>p.pClass button{width:90}</STYLE> <SCRIPT> function doShow(){ showA.innerHTML='divObj.currentStyle.textAlign='+divObj.currentStyle.textAlign; } </SCRIPT> <DIV id="divObj" style="width:500;border:1;text-align:justify;text-justify:distribute;border:solid 1 blue"> ¼Ó¼ºÀº ¾î¶»°Ô Á¤·ÄÇÒ °ÍÀΰ¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿ÀÌ´Ù. </DIV> <P class="pClass"> <BUTTON onclick="divObj.style.textAlign='center';doShow();">center</BUTTON> <BUTTON onclick="divObj.style.textAlign='justify';doShow();">justify</BUTTON> <BUTTON onclick="divObj.style.textAlign='left';doShow();">left</BUTTON> <BUTTON onclick="divObj.style.textAlign='right';doShow();">right</BUTTON> <DIV id=showA><SCRIPT>document.write('divObj.style.textAlign='+divObj.style.textAlign)</SCRIPT></DIV>