¹®¼ÀÇ °èÅëµµ¿¡¼ ´ÙÀ½¿¡ À§Ä¡µÈ °³Ã¼ÀÇ ¾Æ·¡ÂÊ¿¡ »ó´ëÀûÀÎ °³Ã¼ÀÇ ¾Æ·¡ÂÊ À§Ä¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
auto | µðÆúÆ®À̸ç, º¸ÅëÀÇ HTML ¹®¼ÀÇ ¹èÄ¡¿¡µû¸¥ µðÆúÆ® À§Ä¡ÀÌ´Ù. |
(±æÀÌ) | ºÎµ¿¼Ò¼öÁ¡¼öÄ¡ ´ÙÀ½¿¡ cm, mm, in, pt, pc³ª px µî ±æÀÌ ´ÜÀ§°¡ µû¸£´Â Àý´ë ±æÀÌ, ȤÀº em or ex µîÀÇ ´ÜÀ§°¡ µû¸£´Â »ó´ë ±æÀÌÀÌ´Ù. CSS ±æÀÌ´ÜÀ§¸¦ ÂüÁ¶Ç϶ó. |
(¹éºÐÀ²) | Á¤¼ö°ª¿¡ ¹éºÐÀ² ±âÈ£(%)¸¦ ºÙÀÎ °ÍÀÌ´Ù. ÀÌ °ªÀº ¸ðüÀÇ ³ôÀÌ¿¡ ´ëÇÑ »ó´ëÀûÀÎ ¹éºÐÀ²°ªÀÌ´Ùt. |
ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº autoÀÌ´Ù.
CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÇÁö ¾Ê´Â´Ù.
position ¾ÖÆ®¸®ºäÆ®°¡ ¼³Á¤µÈ °æ¿ì¿¡¸¸ bottom ¾ÖÆ®¸®ºäÆ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ±×·¸Áö ¾ÊÀ¸¸é bottom ¾ÖÆ®¸®ºäÆ®´Â ¹«½ÃµÈ´Ù.
bottom ¼Ó¼º°ªÀÌ ¹®ÀÚ¿À̹ǷÎ, ½ºÅ©¸³Æ®·Î ¹®¼¿¡¼ °³Ã¼ÀÇ À§Ä¡¸¦ °è»êÇϴµ¥ ÀÌ ¼Ó¼ºÀ» »ç¿ëÇÒ ¼ö ¾ø´Ù. ´ë½Å pixelBottomÀ̳ª posBottom ¼Ó¼ºÀ» »ç¿ëÇ϶ó.
°³Ã¼ | script | CSS | IE ¹öÀü |
---|
ÀÌ ¼Ó¼ºÀº CSS2(Cascading Style Sheets Level 2)¿¡ Á¤ÀǵǾú´Ù.
onmouseover¿Í onmouseout À̺¥Æ®·Î À§Ä¡¸¦ Á¶Á¤ÇÑ´Ù.
<SCRIPT> function showPos(){ str='divObj.style.top=<FONT color=blue>'+divObj.style.top+'</FONT><BR>'; str+='divObj.style.bottom=<FONT color=blue>'+divObj.style.bottom+'</FONT><BR>'; str+='divObj.style.left=<FONT color=blue>'+divObj.style.left+'</FONT><BR>'; str+='divObj.style.right=<FONT color=blue>'+divObj.style.right+'</FONT><BR>'; showA.innerHTML=str; } </SCRIPT> <DIV id="container" style="border:solid 1 blue;background-color:ffd;height:200;width:500"> <IMG id="divObj" style="position:relative;top:30px;bottom:40;left:50;right:20" src="../../gif/flower.jpg" width=200 onmouseover="this.style.top='60';this.style.bottom='80';this.style.left='100';this.style.right='60';showPos()" onmouseout="this.style.top='10';this.style.bottom='40';this.style.left='50';this.style.right='20';showPos()"> </DIV> <SCRIPT> str='divObj.style.position='+divObj.style.position+'<BR>'; str+='divObj.style.top='+divObj.style.top+'<BR>'; str+='divObj.style.bottom='+divObj.style.bottom+'<BR>'; str+='divObj.style.left='+divObj.style.left+'<BR>'; str+='divObj.style.pixelTop='+divObj.style.pixelTop+'<BR>'; str+='divObj.style.pixelLeft='+divObj.style.pixelLeft+'<BR>'; str+='divObj.style.posTop='+divObj.style.posTop+'<BR>'; str+='divObj.style.posLeft='+divObj.style.posLeft+'<BR>'; document.write(str); </SCRIPT> <DIV id=showA>°á°ú Ç¥½Ãâ</DIV>