<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<title>딸치와 함께하는 드림위버 공부방</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--하단 스크롤링 바 Start-->
<div id=floater style="position:absolute; left:0px; top:870px; width:100%; height:30px; z-index:100; background-color: #FFCC00; layer-background-color: #FFCC00; border: 1px none #000000;">
<script language="javascript">
<!--//
function GoTop()
{
window.scrollTo(0,0);
}
function GoTop_Call()
{
document.body.ondblclick = Top;
}
function FloatMenu()
{
docWidth = document.body.clientWidth; // Update document width
docHeight = document.body.clientHeight; // Update document height
oldScrollPos = scrollPos;
scrollPos = document.body.scrollTop; // Update scrollbar position
Xpos = 0;
//Xpos = (docWidth - floater.offsetWidth) - 10; //오른쪽 여백 배너가 오른쪽에 붙을경우
//Xpos = (docWidth / 2) + 410; // 중앙정렬일경우. " + 410 은 테이블 크기 / 2 "
Yboundary = ((scrollPos + docHeight) - floater.offsetHeight) - 0; //하단여백
if (floater.offsetTop < Yboundary - 1) // Object is behind boundary
Ypos += 2;
if (floater.offsetTop > Yboundary + 1) // Object is past boundary
Ypos -= 1;
Ypos *= Ygravity; // Slow object down
floater.style.pixelLeft = Xpos;
floater.style.pixelTop += Ypos; // Make object bounce
}
function startscroll()
{ // 스크롤 시작
i=0;
for (i in scroll_content)
n_panel++;
n_panel = n_panel -1 ;
startPanel = Math.round(Math.random()*n_panel);
if(startPanel == 0)
{
i=0;
for (i in scroll_content)
insert_area(total_area, total_area++); // area 삽입
}
else if(startPanel == n_panel)
{
insert_area(startPanel, total_area);
total_area++;
for (i=0; i<startPanel; i++)
{
insert_area(i, total_area); // area 삽입
total_area++;
}
}
else if((startPanel > 0) || (startPanel < n_panel))
{
insert_area(startPanel, total_area);
total_area++;
for (i=startPanel+1; i<=n_panel; i++)
{
insert_area(i, total_area); // area 삽입
total_area++;
}
for (i=0; i<startPanel; i++)
{
insert_area(i, total_area); // area 삽입
total_area++;
}
}
window.setTimeout("scrolling()",waitingtime);
}
function scrolling()
{ // 실제로 스크롤 하는 부분
if (bMouseOver && wait_flag)
{
for (i=0;i<total_area;i++){
tmp = document.getElementById('scroll_area'+i).style;
tmp.top = parseInt(tmp.top)-scrollspeed;
if (parseInt(tmp.top) <= -scrollerheight){
tmp.top = scrollerheight*(total_area-1);
}
if (s_tmp++ > (s_amount-1)*scroll_content.length){
wait_flag=false;
window.setTimeout("wait_flag=true;s_tmp=0;",waitingtime);
}
}
}
window.setTimeout("scrolling()",1);
}
function insert_area(idx, n)
{ // area 삽입
html='<div style="left: 0px; width: 250px; position: absolute; top: '+(scrollerheight*n)+'px" id="scroll_area'+n+'">\n';
html+=scroll_content[idx]+'\n';
html+='</div>\n';
document.write(html);
}
//-->
</script>
<script language="javascript">
<!--//
var Xpos = 0;
var Ypos = 0;
var Ygravity = 0.85;
var scrollPos = 0;
var oldScrollPos = 0;
window.setInterval("FloatMenu()", 1); //매개변수중 뒷쪽 숫자는 내려오는 속도
//-->
</script>
</div>
<!--하단 스크롤링 바 End-->
</body>
</html>
'html' 카테고리의 다른 글
테이블에 스크롤바 생성하기 (0) | 2017.02.01 |
---|---|
특수문자 (0) | 2017.02.01 |
ifmame안쓰고frame만들기 (0) | 2017.02.01 |
메뉴탭 바꾸기 (한게임) (0) | 2017.02.01 |
Example Form Markup (0) | 2017.02.01 |