dw MARQUEE走马灯 如何 头接尾 滚动
<MARQUEEonmouseover=this.scrollDelay=10000width="500"onmouseout=this.scrollDelay=30sc...
<MARQUEE onmouseover=this.scrollDelay=10000 width="500" onmouseout=this.scrollDelay=30 scrollAmount=5 scrollDelay=30 direction=right height=100% loop="-1">
<table width="200" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"><img src="img/20071007_4a0bdd4e90ec81a958af4ozb4HXXnCV0.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_04aae51a64c61f450f6fwwt0gVj0EyhJ.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a41f9d27c53e48d1a40FKdzSCUgTZg5.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a11500b5cd8fbe979b7tIKl8wXXSDNA.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_85f02cf3abeddd515c843ovhk2BaDkcG.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_944920ef8cf5c39b45a9NhIm8tX4HbCb.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_814d5d32e3a6151162f03tBJjjUzkcIs.jpg" width="96" height="96"></a></td>
<tr>
</table>
</MARQUEE>
这代码可以实现图片由左向右滚动,但是我想要它 的头部接上尾部一起滚动,不要第一次完全滚动完才出现第二次滚动,请问如何修改? 展开
<table width="200" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"><img src="img/20071007_4a0bdd4e90ec81a958af4ozb4HXXnCV0.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_04aae51a64c61f450f6fwwt0gVj0EyhJ.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a41f9d27c53e48d1a40FKdzSCUgTZg5.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a11500b5cd8fbe979b7tIKl8wXXSDNA.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_85f02cf3abeddd515c843ovhk2BaDkcG.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_944920ef8cf5c39b45a9NhIm8tX4HbCb.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_814d5d32e3a6151162f03tBJjjUzkcIs.jpg" width="96" height="96"></a></td>
<tr>
</table>
</MARQUEE>
这代码可以实现图片由左向右滚动,但是我想要它 的头部接上尾部一起滚动,不要第一次完全滚动完才出现第二次滚动,请问如何修改? 展开
展开全部
这样就不需要<marquee>了,直接用SCRIPT实现,附修改后的代码:
<div id="scroll_div" style="OVERFLOW: hidden; WIDTH: 770px; HEIGHT: 80px;" align="center">
<table>
<tr>
<td id="scroll_begin" width="100%">
<!--这里开始输入要滚动的页面-->
<table width="200" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"><img src="img/20071007_4a0bdd4e90ec81a958af4ozb4HXXnCV0.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_04aae51a64c61f450f6fwwt0gVj0EyhJ.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a41f9d27c53e48d1a40FKdzSCUgTZg5.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a11500b5cd8fbe979b7tIKl8wXXSDNA.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_85f02cf3abeddd515c843ovhk2BaDkcG.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_944920ef8cf5c39b45a9NhIm8tX4HbCb.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_814d5d32e3a6151162f03tBJjjUzkcIs.jpg" width="96" height="96"></a></td>
<tr>
</table>
<!--结束在这里-->
</td>
<td id=scroll_end></td>
</tr>
</table>
<SCRIPT>
var speed=60
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else{
scroll_div.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>
</div>
<div id="scroll_div" style="OVERFLOW: hidden; WIDTH: 770px; HEIGHT: 80px;" align="center">
<table>
<tr>
<td id="scroll_begin" width="100%">
<!--这里开始输入要滚动的页面-->
<table width="200" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="20"><img src="img/20071007_4a0bdd4e90ec81a958af4ozb4HXXnCV0.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_04aae51a64c61f450f6fwwt0gVj0EyhJ.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a41f9d27c53e48d1a40FKdzSCUgTZg5.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_6a11500b5cd8fbe979b7tIKl8wXXSDNA.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_85f02cf3abeddd515c843ovhk2BaDkcG.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_944920ef8cf5c39b45a9NhIm8tX4HbCb.jpg" width="96" height="96"></a></td>
<td width="20"><img src="img/20071007_814d5d32e3a6151162f03tBJjjUzkcIs.jpg" width="96" height="96"></a></td>
<tr>
</table>
<!--结束在这里-->
</td>
<td id=scroll_end></td>
</tr>
</table>
<SCRIPT>
var speed=60
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else{
scroll_div.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>
</div>
2015-09-03 · 知道合伙人软件行家
关注
展开全部
方法1.
<marquee id="scrollarea" direction="up" scrolldelay="5" scrollamount="5" width="167" height="580" onmouseover="this.stop();" onmouseout="this.start();"> 内容 </marquee>
behavior="alternate" 左右滚动
方法2.
首尾相接
<div id=maq style=overflow:hidden;height:100px;width:150px;>
<div id=mtext>
1.文字也是可以连续滚动的<br>
2.文字也是可以连续滚动的<br>
3.文字也是可以连续滚动的<br>
4.文字也是可以连续滚动的<br>
5.文字也是可以连续滚动的<br>
6.文字也是可以连续滚动的<br>
</div>
<div id=m0></div>
</div>
<script>
var speed=40 //调整滚动速度
m0.innerHTML=mtext.innerHTML
function Marquee(){
if(m0.offsetTop-maq.scrollTop<=0)
maq.scrollTop-=mtext.offsetHeight
else{
maq.scrollTop++
}
}
var MyMar=setInterval(Marquee,speed)
maq.onmouseover=function()
maq.onmouseout=function()
</script>
<marquee id="scrollarea" direction="up" scrolldelay="5" scrollamount="5" width="167" height="580" onmouseover="this.stop();" onmouseout="this.start();"> 内容 </marquee>
behavior="alternate" 左右滚动
方法2.
首尾相接
<div id=maq style=overflow:hidden;height:100px;width:150px;>
<div id=mtext>
1.文字也是可以连续滚动的<br>
2.文字也是可以连续滚动的<br>
3.文字也是可以连续滚动的<br>
4.文字也是可以连续滚动的<br>
5.文字也是可以连续滚动的<br>
6.文字也是可以连续滚动的<br>
</div>
<div id=m0></div>
</div>
<script>
var speed=40 //调整滚动速度
m0.innerHTML=mtext.innerHTML
function Marquee(){
if(m0.offsetTop-maq.scrollTop<=0)
maq.scrollTop-=mtext.offsetHeight
else{
maq.scrollTop++
}
}
var MyMar=setInterval(Marquee,speed)
maq.onmouseover=function()
maq.onmouseout=function()
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
MARQUEE 有一个属性可以设置的 你在DW中找找看 很久不用最后玩意 记不得了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |