文字图片向上不间断滚动代码[转]
2012-1-30 18:11 Monday  

分类: HTML 评论(66) 浏览(50899)

<DIV id=demo style="BACKGROUND: #ffffff; OVERFLOW: hidden; WIDTH: 150px; COLOR: #0000ff; HEIGHT: 200px"> 
    <DIV id=demo1> 
        <div align="center"> 
        <A href="http://www.dream68.cn"><IMG src="/image/logo.gif" height=50 border=0></A><br> 
        <A href="http://www.dream68.cn"><IMG src="/image/logo.gif" height=50 border=0></A><br> 
        <A href="http://www.dream68.cn"><IMG src="/image/logo.gif" height=50 border=0></A><br> 
<A href="http://www.dream68.cn"><IMG src="/image/logo.gif" height=50 border=0></A><br><A href="http://www.dream68.cn"><IMG src="/image/logo.gif" height=50 border=0></A> 
        </div> 
    </DIV> 
    <DIV id=demo2></DIV> 
</DIV> 
<SCRIPT language="javascript"> 
var speed=50; 
demo2.innerHTML=demo1.innerHTML; 
function Marquee(){ 
    if(demo2.offsetTop-demo.scrollTop<=0){ 
        demo.scrollTop-=demo1.offsetHeight; 
    } 
    else{ 
        demo.scrollTop++; 
    } 
} 
var MyMar=setInterval(Marquee,speed); 
demo.onmouseover=function() {clearInterval(MyMar)}; 
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}; 
</SCRIPT>

+1 23

留下你的看法: