<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>间断滚动</title>
<style>
#Marquee{ height:20px; overflow:hidden;}
#Marquee div{ border:1px solid #DDD3FE; background:#EEECF4; height:18px;}
</style>
</head>
<body>
<div )
var picH = 20;//移动高度
var scrollstep=3;//移动步幅,越大越快
var scrolltime=20;//移动频度(毫秒)越大越慢
var stoptime=3000;//间断时间(毫秒)
var tmpH = 0;
Mar.innerHTML += Mar.innerHTML;
function start(){
    if(tmpH < picH){
        tmpH += scrollstep;
        if(tmpH > picH )tmpH = picH ;
        Mar.scrollTop = tmpH;
        setTimeout(start,scrolltime);
    }else{
        tmpH = 0;
        Mar.appendChild(child_div[0]);
        Mar.scrollTop = 0;
        setTimeout(start,stoptime);
    }
}
onload=function(){setTimeout(start,stoptime)};
</script></body>
</html>

相关文章:

  • 2021-06-23
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案