商务合作:179001057@qq.com

JS间断不间断向左滚动

技术2022-05-11  0


某平台价值19860元的编程课程资料免费领取【点我领取】


<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id=demo1 valign=top>      <img src="images/Photo2.jpg"><img src="images/Photo2.jpg"><img src="images/Photo2.jpg"><img src="images/Photo2.jpg"><img src="images/Photo2.jpg"><img src="images/Photo2.jpg">  </td><td id=demo2 valign=top></td></tr></table></div>   <script>   var speed=30   demo2.innerHTML=demo1.innerHTML   function Marquee(){   if(demo2.offsetWidth-demo.scrollLeft<=0)   demo.scrollLeft-=demo1.offsetWidth   else{   demo.scrollLeft++   }   }   var MyMar=setInterval(Marquee,speed)   demo.οnmοuseοver=function() {clearInterval(MyMar)}   demo.οnmοuseοut=function() {MyMar=setInterval(Marquee,speed)}   </script>

最新回复(0)