DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> DIV十CSS布局 >> 布局實例 >> 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>

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved