怎么让几张图片在一个固定区域内上下首尾相连滚动,而中间不出现空白区域。 50
我现在使用的这组语法,只能使几张图片自下而上滚动,当最下一张滚动到顶部后消失候,整个滚动区域就成了一片空白。<MARQUEEonmouseover=this.stop()...
我现在使用的这组语法,只能使几张图片自下而上滚动,当最下一张滚动到顶部后消失候,整个滚动区域就成了一片空白。
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=5 direction=up height=300>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV></MARQUEE>
怎么让他首尾相连,中间不出现空白地滚动呢?谢谢!
下面这一组语法能做到这样的效果:
<div id=demo style=overflow:hidden;height:150;width:460; bgcolor="#FEE8C1";>
<table align=left cellpadding=0 cellspace=0 border=0 >
<tr><td id=demo1 valign=top bgcolor=#FEE8C1><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137>
</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.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
他是从右向左连续滚动的,中间不会出现空白,怎么改成自下而上滚动,或者自上而下呢。 展开
<MARQUEE onmouseover=this.stop() onmouseout=this.start() scrollAmount=5 direction=up height=300>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV>
<DIV align=center><IMG alt="" src="http://img.baidu.com/img/logo-zhidao.gif" border=0></DIV></MARQUEE>
怎么让他首尾相连,中间不出现空白地滚动呢?谢谢!
下面这一组语法能做到这样的效果:
<div id=demo style=overflow:hidden;height:150;width:460; bgcolor="#FEE8C1";>
<table align=left cellpadding=0 cellspace=0 border=0 >
<tr><td id=demo1 valign=top bgcolor=#FEE8C1><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137><IMG height=46
src="http://img.baidu.com/img/logo-zhidao.gif"
width=137>
</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.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
他是从右向左连续滚动的,中间不会出现空白,怎么改成自下而上滚动,或者自上而下呢。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询