如何让图片无间断的连续循环滚动? <marquee>标签能否实现?如果实现不了有没有其他代码可以实现?
如图中不要留空白。要图片连续无间断的滚动
<div id=demo style="overflow:hidden; width:128px; height:300px;">
<div id=demo1>
<img src="http://img.mms.sohu.com/mms/1400/53/51253/p2.gif"><br><img src="http://img.mms.sohu.com/mms/1080/64/58064/p2.gif"><br><img src="http://img.mms.sohu.com/mms/1080/68/60368/p2.gif"><br></div>
<div id=demo2></div>
</div>
<script language="javascript">
var speed=30
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
<div id=demo style="overflow:hidden; width:128px; height:300px;">
<div id=demo1>
<img src="
http://img.mms.sohu.com/mms/1400/53/51253/p2.gif"><br><img src="
http://img.mms.sohu.com/mms/1080/64/58064/p2.gif"><br><img src="http://img.mms.sohu.com/mms/1080/68/60368/p2.gif"><br> </div>
<div id=demo2></div>
</div>
<script language="javascript">
var speed=30
demo2.innerHTML=demo1.innerHTML
demo.scrollTop=demo.scrollHeight
function Marquee(){
if(demo1.offsetTop-demo.scrollTop>=0)
demo.scrollTop+=demo2.offsetHeight
else{
demo.scrollTop--
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>