随滚动条移动的层 - 5iuu.com .div{ position: absolute; border: 2px solid red; background-color: #EFEFEF; line-height:90px; font-size:12px; z-index:1000; } 正中... function sc1(){ document.getElementById("Javascript.Div1").style.t op=document.body.scrollTop+(document.body.clientHei ght-document.getElementById("Javascript.Div1").offs etHeight)/2 document.getElementById("Javascript.Div1").style.l eft=document.body.scrollLeft+(document.body.clientW idth-document.getElementById("Javascript.Div1").off setWidth)/2; } 左上... function sc2(){ document.getElementById("Javascript.Div2").style.t op=document.body.scrollTop document.getElementById("Javascript.Div2").style.l eft=document.body.scrollLeft; } 左下... function sc3(){ document.getElementById("Javascript.Div3").style.t op=document.body.scrollTop+document.body.clientHeig ht-document.getElementById("Javascript.Div3").offse tHeight; document.getElementById("Javascript.Div3").style.l eft=document.body.scrollLeft; } 右上... function sc4(){ document.getElementById("Javascript.Div4").style.t op=document.body.scrollTop; document.getElementById("Javascript.Div4").style.l eft=document.body.scrollLeft+document.body.clientWi dth-document.getElementById("Javascript.Div4").offs etWidth; } 右下... function sc5(){ document.getElementById("Javascript.Div5").style.t op=document.body.scrollTop+document.body.clientHeig ht-document.getElementById("Javascript.Div5").offse tHeight; document.getElementById("Javascript.Div5").style.l eft=document.body.scrollLeft+document.body.clientWi dth-document.getElementById("Javascript.Div5").offs etWidth;; }