.noticebox{width:150px;height:25px;line-height:25px;border:#bbb 1px solid;overflow:hidden;}
.noticebox ul{margin:0;padding:0}
.noticebox li{height:25px;line-height:25px;font-size:12px;text-align:center;list-style-type:none;}
- 第一行
- 第二行
- 第三行
- 第一行
- 第二行
- 第三行
function startmarquee(lh,speed,delay,index){
var t;
var p=false;
var o=document.getElementById("marqueebox"+index);
o.innerHTML+=o.innerHTML;
o.οnmοuseοver=function(){p=true}
o.οnmοuseοut=function(){p=false}
o.scrollTop = 0;
function start(){
t=setInterval(scrolling,speed);
if(!p){ o.scrollTop += 1;}
}
function scrolling(){
if(o.scrollTop%lh!=0){
o.scrollTop += 1;
if(o.scrollTop>=o.scrollHeight/2) o.scrollTop = 0;
}else{
clearInterval(t);
setTimeout(start,delay);
}
}
setTimeout(start,delay);
}
startmarquee(25,30,3000,0);
startmarquee(25,40,0,1);