setTimeout(function(){ speed = 50; //滾動速度 var tab = document.getElementById("demo");//外層可視模塊 var tab1 = document.getElementById("demo1");//内層滾動内容模塊1var tab2 = document.getElementById("demo2");//内層滾動内容模塊2 無縫對接到1後面的内容tab2.innerHTML = tab1.innerHTML;//克隆demo1爲demo2tab.scrollTop = tab1.offsetHeight;//創建一個滾動函數,當滾動至demo1與demo2交界時,demo跳到最頂端function Marquee(){ if (tab.scrollTop >= tab1.offsetHeight) { tab.scrollTop-=tab2.offsetHeight; }else{ tab.scrollTop+=1; }}var MyMar=setInterval(Marquee,speed);},1500);//隐藏頭尾空白行setTimeout(function(){ document.getElementById("r-1-0").style.height=0;},100);-------------------------------------上面部分跑马灯是生效的_g().startMarquee({ offset: 2, interval: 0.3, stopOnHover:true });