<html>
<head>
<title></title>
<SCRIPT language=JavaScript1.2>
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = -10;
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.banner.style.pixelTop += percent;
if(NS) document.banner.top += percent;
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.banner.style.pixelLeft += percent;
if(NS) document.banner.top += percent;
lastScrollY = lastScrollY + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat()",1);
</script>
</head>
<body>
<center>
<table width=700 height=1500 border style="position:relative">
<td>
<!--스크롤박스-->
<div id="banner" style="position:absolute; left:710px; top:150px;">
<table border="0" width="55" height="100" cellspacing="0" cellpadding="0">
<td bgcolor=0><font color=white>스크롤</td>
</table>
</div>
<!--스크롤박스-->
</td>
</table>
<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>
위 소스를 복사해서 한번 테스트 해보세요...
중앙정렬일때
스크롤 박스가 유동적으로 변하게 됩니다...
<head>
<title></title>
<SCRIPT language=JavaScript1.2>
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = -10;
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.banner.style.pixelTop += percent;
if(NS) document.banner.top += percent;
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.banner.style.pixelLeft += percent;
if(NS) document.banner.top += percent;
lastScrollY = lastScrollY + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat()",1);
</script>
</head>
<body>
<center>
<table width=700 height=1500 border style="position:relative">
<td>
<!--스크롤박스-->
<div id="banner" style="position:
<table border="0" width="55" height="100" cellspacing="0" cellpadding="0">
<td bgcolor=0><font color=white>스크롤</td>
</table>
</div>
<!--스크롤박스-->
</td>
</table>
<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>
위 소스를 복사해서 한번 테스트 해보세요...
중앙정렬일때
스크롤 박스가 유동적으로 변하게 됩니다...