定位div

<script type="text/javascript" > window.onload=function(){ var pContainer=document.getElementById("page-container"); var tContainer=document.getElementById("div-container"); tContainer.style.left=pContainer.offsetLeft + 410; tContainer.style.top=130;; }

</script>

 

 

#div-container {
position:absolute;
    display:block;
    height:450px;
 width:550px;
 background-color:white;
 display:block;
 filter:alpha(opacity=20);
 opacity:0.2;
 border:solid 1px #F2F2F2;
 
   }

你可能感兴趣的:(div)