문서 계통도상 다음에 위치한 개체의 왼쪽 모서리에서 해당 개체의 왼쪽 위치까지의 거리를 반환하거나 설정한다.

Scriptobject.style.left=[sVal]
HTML<ELEMENT style="left:sVal;">
CSScssSelector {left:sVal;}
인수
cssSelector : (스타일 선택자)
left 속성을 가질수 있는 엘레멘트(ELEMENT)나 클라스(class) 이름 혹은 인식자(id)이다.

sVal : (속성 문자열)
left 스타일 속성은 개체 속에서 글자와 글자 사이의 추가적인 거리를 나타내는 문자열이다.

auto 디폴트이며, 일반적인 HTML 페이지의 레이아웃상 디폴트 위치이다.
(길이) 부동소수점수치 다음에 cm, mm, in, pt, pcpx 등 길이 단위가 따르는 절대 길이, 혹은 em or ex 등의 단위가 따르는 상대 길이이다. CSS 길이단위를 참조하라.
(백분율) 정수값에 백분율 기호(%)를 붙인 것이다. 이 값은 모체 너비에 대한 백분율이다.

이 속성은 currentStyle에서는 읽기전용이고, 그외의 개체에서는 읽기/쓰기이며, 디폴트값은 auto이다.

CSS(Cascading Style Sheets) 애트리뷰트는 상속되지 않는다.

특기

left 애르리뷰트를 사용하기 위해서는 position 애트리뷰트가 설정되어 있어야 하며, 그렇지 않으면 left 애트리뷰트는 무시된다.

left 속성의 값은 문자열이므로, 이 속성값을 스크립트의 개체의 위치 계산에 사용할 수 없다.
대신 pixelLeft 속성이나 posLeft 속성을 사용하여야 한다.

적용
개체scriptCSS IE 버전
aa.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
addressaddress.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
appletapplet.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
bb.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
bigbig.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
blockQuoteblockQuote.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
buttonbutton.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
centercenter.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
citecite.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
codecode.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
currentStyle[sVal=]objectcurrentStyle.leftcssSelector{left:sVal}IE5(win16,win32,unix,mac)
customcustom.style.left[=sVal]cssSelector{left:sVal}IE5(win32,unix)
dddd.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
publicDefaultspublicDefaults.style.left[=sVal]cssSelector{left:sVal}IE5,5(win32)
dfndfn.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
dirdir.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
divdiv.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
dldl.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
dtdt.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
emem.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
embedembed.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
fieldSetfieldSet.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
fontfont.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
formform.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
hnhn.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
hrhr.style.left[=sVal]cssSelector{left:sVal}IE3.02(win16,win32,mac),IE4.0(ce,unix)
ii.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
iFrameiFrame.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
imgimg.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
buttonbutton.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
checkboxcheckbox.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
FileUploadFileUpload.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
imageimage.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
passwordpassword.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
radioradio.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
resetreset.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
submitsubmit.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
texttext.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
isIndexisIndex.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
kbdkbd.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
labellabel.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
legendlegend.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
lili.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
listinglisting.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
marqueemarquee.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
menumenu.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
ObjectObject.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
olol.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
pp.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
prepre.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
runtimeStyleobjectruntimeStyle.left[=sVal]cssSelector{left:sVal}IE5(win16,win32,unix,mac)
ss.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
sampsamp.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
selectselect.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
smallsmall.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
spanspan.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
strikestrike.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
strongstrong.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
stylestyle.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
subsub.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
supsup.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
tabletable.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
textAreatextArea.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
tttt.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
uu.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
ulul.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
varvar.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
xmpxmp.style.left[=sVal]cssSelector{left:sVal}IE4.0(win16,win32,ce,unix,mac)
참조
pixelTop pixelBottom pixelLeft pixelRight posTop posBottom posLeft posRight
top bottom left right

이 속성은 CSS2(Cascading Style Sheets Level 2)에 정의되었다.


style
left 스타일속성
left</b> 스타일속성이전페이지로페이지 맨위로페이지 맨아래로

position:relative; 설정과 left 애트리뷰트를 이용하여 이미지 개체의 위치를 조정한다.

<STYLE>.divObj button{width:80}</STYLE>
<DIV style="border:solid 1 red;width:480"><IMG id=imgObj src=../../gif/tulip.gif style="position:relative;left:100"></DIV>
<DIV class=divObj style=white-space:nowrap>
<BUTTON onclick="imgObj.style.left='-30px';">-30px</BUTTON>
<BUTTON onclick="imgObj.style.left='0';">0</BUTTON>
<BUTTON onclick="imgObj.style.left='4cm';">4cm</BUTTON>
<BUTTON onclick="imgObj.style.left='200px';">200px</BUTTON>
<BUTTON onclick="imgObj.style.left='80%';">80%</BUTTON>
<BUTTON onclick="imgObj.style.left='auto';">auto</BUTTON>
</DIV>
style
left 스타일속성
견본
이전페이지로페이지 맨위로
최종 수정:
05/13/2025 17:20:56
KoXo Homepage
All right reserved
비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다.
오류가 나면 정상적 접속으로 시도해 보세요.
http://koxo.com/lang/js/style/left.html