*{margin: 0;padding:0;}
.bg{background: #345;border-radius: 20px;width: 350px;margin: 0 auto;font-family: "微软雅黑";color: #9cf;}
#box{height: 144px;overflow: hidden;}
#box ul{list-style: none;margin-left: 40px}
#box ul li{line-height: 25px;cursor: pointer;}
- 算一算虚度了多少个年头
- 仿佛足够写一套错爱的春秋
- 如果以后你还想为谁
- 浪费美好时候
- 眼泪只能在我的胸膛
- 毫无保留
- 互相折磨到白头
- 悲伤坚决不放手
- 开始纠缠之后
- 才又被人放大了自由
- 你的暴烈太温柔
- 感情又痛又享受
var box=document.getElementById('box'),
con1=document.getElementById('con1'),
con2=document.getElementById('con2'),
aLi=document.getElementsByTagName('li'),
h=25,//行高
timer,//计时器
timeo,
speed=30,//速度
delay=2000;//延时
con2.innerHTML=con1.innerHTML;
function startMove(){
box.scrollTop++
timer=setInterval(judge,speed)
}
function judge(){
if(box.scrollTop%h==0){
clearInterval(timer)
timeo=setTimeout(startMove,delay)
}
else{
box.scrollTop++
}
if(box.scrollTop>=con1.offsetHeight){
box.scrollTop=0
}
}
var timeo=setTimeout(startMove,delay)//初始化
var flag=0
for(var i=0;i
aLi[i].οnmοuseοver=function(){
this.style.color="yellow";
//待补充
}
aLi[i].οnmοuseοut=function(){
this.style.color="";
//待补充
}
}