<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD"> "http://www.w3.org/1999/xhtml"> "Content-type"Content="text/html; charset=gb2312"/> <title>fixed Fixed position suspension div layer 丨 Hebei natto </title> <style> * {font-size:12px; font-Family:verdana, song Body;} HTML, body {margin:0px; padding:0px; overflow:hidden;} . b {margin:0px; padding:0px; overflow:auto;} . line0 { Line-height:20px; background-color:lightyellow; padding:0px 15px;} . line1 { Line-height:18px; background-color:lightblue; padding:0px 10px;} . w {position:absolute; right:10px; bottom:10px; width:160px; height:240px; overflow:hidden; border:2px Groove #281; Cursordefault; -moz-user-Select: none;} . t { Line-height:20px; height:20px; width:160px; Overflow:hidden; Background-color: #27C; Color:white; Font-weight:bold; border-bottom:1px outset blue; text-Align:center;} . winbody {height:218px; width:160px; overflow-x:hidden; Overflow-y:auto; border-top:1px inset Blue; padding:10px; text-indent:10px; background-Color:white;} </style> class="W"> <divclass="T"> Fixed layer </div> <divclass="Winbody"> Welcome <br><br> Web Effects <br><br>http://www.ruilongmenye.com/</div> </div> </ Body> <p align="Center"><font color=black> This special effect by <a href="http://www.CsrCode.cn"target="_blank"> Satan and so on Ask </font></p>//test, randomly produce certain content for(varI=0; i< -; i++) document.write ("<div class=\ " line"+ (i%2)+"\ ">"+(NewArray ( -). Join ((Math.random () *1000000). ToString ( $)+" ")+"<\/div>"); //The code is as follows: Newfunction (w,b,c,d,o) {d=document;b=d.body;o=b.childnodes;c="ClassName"; B.appendchild (W=d.createelement ("Div")) [c]="b"; for(varI=0; i<o.length-1; i++)if(o[i][c]!="W") W.appendchild (O[i]), i--; (Window.onresize=function () {W.style.width= D.documentelement.clientwidth +"px"; W.style.height= D.documentelement.clientheight +"px"; })(); } </script> Suspended div layer with fixed position