<div class="codetitle"> <span><a style="CURSOR: pointer" data="80999" class="copybut" id="copybut80999" onclick="doCopy('code80999')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code80999"> <br> <br> <br> <br><title>随滚动条移动的层 </title> <br><meta http-equiv="Content-Type" content="text/html" charset="gb2312"> <br> <br><style> <BR><!-- <BR>.div{ <BR>position: absolute; <BR>border: 2px solid red; <BR>background-color: #EFEFEF; <BR>line-height:90px; <BR>font-size:12px; <BR>z-index:1000; <BR>} <BR>--> <BR></style> <br> <br><div id="Javascript.Div1" class="div" style="width: 240px; height:90px" align="center">姝d腑...</div> <br><script language="JavaScript"> <BR>function sc1(){ <BR>document.getElementById("Javascript.Div1").style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight-document.getElementById("Javascript.Div1").offsetHeight)/2)+"px"; <BR>document.getElementById("Javascript.Div1").style.left=(document.documentElement.scrollLeft+(document.documentElement.clientWidth-document.getElementById("Javascript.Div1").offsetWidth)/2)+"px"; <BR>} <BR></script> <br><div id="Javascript.Div2" class="div" style="width: 240px; height:90px" align="center">宸</div> </div>