CSS HTML5/퍼블리싱 팁

세로롤링배너

웹디자이너 Kang Ji Yeon 2016. 11. 9. 20:25
반응형


<HTML>
<HEAD>
<META http-equiv=content-type content="text/html; charset=euc-kr">
<BODY onload=scroll_ready() style="margin:0px;">
        <DIV id=t0 onmouseover=wait=1 style="VISIBILITY: hidden; POSITION: absolute" onmouseout=wait=0>
        <TABLE height=200 cellSpacing=0 cellPadding=0 width="400" border=0 bgcolor="#FF0000"><TBODY>
          <TR>
                <TD>
                000
                </TD>
          </TR>
        </TABLE>
        </DIV>
        
        <DIV id=t1 onmouseover=wait=1 style="VISIBILITY: hidden; POSITION: absolute" onmouseout=wait=0>
        <TABLE height=200 cellSpacing=0 cellPadding=0 width="400" border=0 bgcolor="#00FF00">
          <TR>
                <TD>
                111
                </TD>
          </TR>
        </TABLE>
        </DIV>

        <DIV id=t2 onmouseover=wait=1 style="VISIBILITY: hidden; POSITION: absolute" onmouseout=wait=0>
        <TABLE height=200 cellSpacing=0 cellPadding=0 width="400" border=0 bgcolor="#0000FF">
          <TR>
                <TD>
                222
                </TD>
          </TR>
        </TABLE>
        </DIV>
<SCRIPT language=javascript> 
var wait = 0;
var tm1;

function allblur() 
{
        for (i = 0; i < document.links.length; i++)
        {
        document.links[i].onfocus = document.links[i].blur;
        }
}
document.onfocusin = allblur;

var scroll_height=200;        //세로길이 
var scroll_speed=15;                        //이동속도 
var scroll_delay=1000;                        //지연시간 (1/1000)초
var scroll_layer=3;        //레이어갯수 

function scroll_ready() 

t0.style.top=0; 
t0.style.visibility='visible'; 
t1.style.top=scroll_height; 
t1.style.visibility='visible'; 

setTimeout('mov(0,1,0)',scroll_delay); 

function mov(no1,no2,i) 

        if(wait == 1)
        {
        setTimeout('mov('+no1+','+no2+','+i+')', 1000);
        return;        
        }
l1=eval('t'+no1); 
l2=eval('t'+no2); 
        if(parseInt(l2.style.top)<=0)
        {         
        l1.style.visibility='hidden'; 
                for(var y=parseInt(l2.style.top);y<=0;y++)
                {
                l2.style.top=parseInt(l2.style.top)+0;
                }
        setting(no2); 
        return; 
        } 

l1.style.top=i*-1; 
l2.style.top=i*-1+scroll_height; 

tm1 = setTimeout('mov('+no1+','+no2+','+(i+scroll_speed)+')', 1); 

function setting(no1) 

no2=(no1>=scroll_layer-1)?0:no1+1; 

l2=eval('t'+no2); 
l2.style.top=scroll_height; 
l2.style.visibility='visible'; 

tm2 = setTimeout('mov('+no1+','+no2+',0)',scroll_delay); 

</SCRIPT>
</BODY>
</HTML>

반응형

'CSS HTML5 > 퍼블리싱 팁' 카테고리의 다른 글

IE8에서 IE6,7 과 동일하게 보이게 하기  (0) 2016.11.09
css 가로메뉴 소스  (0) 2016.11.09
플래시 웹상보이기  (0) 2016.11.09
다른객체로 롤오버하기  (0) 2016.11.09
css로 이미지 롤오버하기  (0) 2016.11.09