티스토리 뷰

   

 

 

 





 

 

 

 

 

 

 

 

 

역시 오래된 소스입니다.

스크롤하면 따라다니는 레이어 소스

배너나 top 버튼으로 사용할수 있어요~

 

 

 

< 상단 스크립트 >


<!--
var stmnGAP1 = 200;
var stmnGAP2 = 4;
var stmnBASE = 250;
var stmnLEFT = 0;              
var stmnActivateSpeed = 100;
var stmnScrollSpeed = 10;


function RefreshStaticMenu()
{
  var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

  stmnStartPoint = parseInt(STATICMENU.style.top, 10);
  stmnEndPoint = document.body.scrollTop + stmnGAP2;
  if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

  if ( stmnStartPoint != stmnEndPoint ) {
    stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
    STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
    stmnRefreshTimer = stmnScrollSpeed;
  }
         else {
    stmnRefreshTimer = stmnActivateSpeed;
  }

  setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}

 

function InitializeStaticMenu()
{
  STATICMENU.style.top = document.body.scrollTop + stmnBASE;
  RefreshStaticMenu();
  STATICMENU.style.left = stmnLEFT;
}
-->
</script>

 

 

 

 

 

 

< body 부분 html >

 

<div id="STATICMENU" style="position:absolute; z-index:100;">
<!-- 컨덴츠 영역 -->
</div>     
<script language="javascript">InitializeStaticMenu();</script>  

 

 

 

 

 

 

 

 


 

 

 

   

댓글