<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><!DOCTYPE html PUBLIC "-//W3C/ /DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=" http://www.w3.org/ <BR> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <BR><html xmlns=" http://www.w3.org/1999/xhtml"> <br><HEAD> <br><TITLE>スクロールバーで移動するレイヤー</TITLE> ><META HTTP-EQUIV="Content-Type" CONTENT="text/html" charset="gb2312"> <br><style> <br>.div{ <br>位置: 絶対値; <br>境界線: 2px 背景色: #EFEFEF; <br>線の高さ: 90px; <br>z-index:1000; <br>} <br></style> <br><div id="Javascript.Div1" "div " style="width: 240px; height:90px" align="center">Center...</div> <br><SCRIPT LANGUAGE="JavaScript"> <br>関数 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> <br><SCRIPT LANGUAGE="JavaScript"> <br>function sc2(){ <br>document.getElementById("Javascript.Div2").style.top= (document.documentElement.scrollTop) "px"; <br>document.getElementById("Javascript.Div2").style.left=(document.documentElement.scrollLeft) "px";スクリプト> <br><br><div id="Javascript.Div3" class="div" style="width: 240px; height:90px" align="center">左下...</div> ; <br> <SCRIPT LANGUAGE="JavaScript"> <br>function sc3(){ <br>document.getElementById("Javascript.Div3").style.top=(document.documentElement.scrollTop document.documentElement. clientHeight-document.getElementById("Javascript.Div3").offsetHeight) "px"; <br>document.getElementById("Javascript.Div3").style.left=(document.documentElement.scrollLeft) "px"; >} <br></SCRIPT> <br><br><div id="Javascript.Div4" class="div" style="width: 240px; height:90px" align="center">そうです...< ;/div> <br><SCRIPT LANGUAGE="JavaScript"> <br>function sc4(){ <br>document.getElementById("Javascript.Div4").style.top=(document) .documentElement.scrollTop) "px"; <br>document.getElementById("Javascript.Div4").style.left=(document.documentElement.scrollLeft document.documentElement.clientWidth-document.getElementById("Javascript.Div4")。 offsetWidth) "px" ; <br>} <br><br><br><br><div id="Javascript.Div5" class="div" style="幅: 240px; 高さ:90px" align="center" >右下...</div> <br><SCRIPT LANGUAGE="JavaScript"> <br>function sc5(){ <br>document.getElementById("Javascript.Div5") ).style.top =(document.documentElement.scrollTop document.documentElement.clientHeight-document.getElementById("Javascript.Div5").offsetHeight) "px"; <br>document.getElementById("Javascript.Div5").style .left=(document .documentElement.scrollLeft document.documentElement.clientWidth-documentById("Javascript.Div5").offsetWidth) "px"; <br>} <br></SCRIPT> <br>< スクリプト言語="JavaScript"> <br><!-- <br>関数 scall(){ <br>sc1();sc2();sc3();sc4();sc5( ); <br> } <br>window.onresize=scall; <br>//-> <br> <br>< div style="位置: 絶対; 上: 0px; 左: 0px; 幅: 10000px; 高さ: 4000px;"</div> <br></BODY> /HTML><br><br> </div>