<style>
ul li{
height:139px;
}
</style>
<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff>
<div id=demo1>
<ul>
<li>123112</li>
<li>123112</li>
<li>456788</li>
</ul>
</div>
<div id=demo2></div>
</div>
<script>
var speed=50
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop=demo.scrollTop+3
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
posted on 2011-09-07 13:37
王豪 阅读(176)
评论(0) 编辑 收藏 所属分类:
JQuery