따라다니는 스크롤
로빈아빠
본문
따라다니는 스크롤
<script> //따라다니는 스크롤 self.onError=null; currentX = currentY = 0; whichIt = null; lastScrollX = 0; lastScrollY = 0; NS = (document.layers) ? 1 : 0; IE = (document.all) ? 1: 0; <!-- STALKER CODE --> function heartBeat() { if(IE) { diffY = document.body.scrollTop; diffX = 0; } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != lastScrollY) { percent = .1 * (diffY - lastScrollY); if(percent > 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) document.all.divMenu.style.pixelTop += percent; //레이어 id if(NS) document.divMenu.top += percent; //레이어 id lastScrollY = lastScrollY + percent; } if(diffX != lastScrollX) { percent = .1 * (diffX - lastScrollX); if(percent > 0) percent = Math.ceil(percent); else percent = Math.floor(percent); if(IE) document.all.divMenu.style.pixelLeft += percent; //레이어 id if(NS) document.divMenu.top += percent; //레이어 id lastScrollY = lastScrollY + percent; } } if(NS || IE) action = window.setInterval("heartBeat()",1); //--> </script> <DIV ID="divMenu" style="position:relative; width:200px; height:0px; z-index:1; left:460px; top: 120px;"> <table width="186" border="0" cellpadding="0" cellspacing="0" style="position:absolute;"> <tr> <td><img src="logo.gif"></td> </tr> </table> </DIV> 따라다니는 스크롤 <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> 따라다니는 스크롤
관련링크
댓글목록
등록된 댓글이 없습니다.