萬盛學電腦網

 萬盛學電腦網 >> 網頁制作 >> DivCSS教程 >> CSS裡隨滾動條滾動代碼

CSS裡隨滾動條滾動代碼

 <div style="width:760px;height:1500px;background-color:#f4f4f4;" align="center"></div> <script language="JavaScript"> lastScrollY=0; function heartBeat(){ diffY=document.body.scrollTop; percent=.1*(diffY-lastScrollY); if(percent>0)percent=Math.ceil(percent); else percent=Math.floor(percent); document.all.lanrentuku.style.pixelTop+=percent; lastScrollY=lastScrollY+percent; } suspendcode45="<DIV id=lanrentuku style='left:800px;POSITION:absolute;TOP:18px;'><A HREF='http://www.xiaoxiangzi.com' target=_blank Title='xiaoxiangzi'><img src='http://www.xiaoxiangzi.com/code/ad.gif' border=0></A></div>" document.write(suspendcode45); window.setInterval("heartBeat()",1); </script>

copyright © 萬盛學電腦網 all rights reserved