2010-12-30 4 views
5

어떻게간단하고 못생긴 - 어떻게 div 위치를 변경하려면?

<div style="z-index:101; position: absolute; left: 0px; top: 324px; width: 20px; height:450px; padding: 0px; border: 0px;" id="wrapper" >Content</div> 

는 아래의 요소의 위치를 ​​변경할 수 있습니다 "왼쪽 : 100 픽셀, 최고 : 100 픽셀을;"

복잡한 기능이 필요하지 않고 쉬운 솔루션입니다. 당신의 도움에 대한

감사합니다 :) idealmachine

답변

24
var div = document.getElementById('wrapper'); 
div.style.left = '100px'; 
div.style.top = '100px'; 
+0

감사합니다;) – DonCroce

관련 문제