此教程是marquee实现无间隙左右滚动的例子, 非常的方便
其中:
marguee——滚动命令
后面的是参数
behavior——设定卷动方式
alternate——交替来回卷动
direction="right" -- 代表 像右侧滚动,如果像左就改成 left ;
scrollamount="3" 3代表滚动的速度,可设置快慢。用数字表示 ;
onmouseover=this.stop() 鼠标放上停止滚动 ;
onmouseout=this.start() 鼠标移开继续滚动 ;
接下来我们一起来看实例!
实例:<style type="text/css">
<!--
.img img {
margin-right:5px;
}
-->
</style>
<table border="0" cellpadding="0" cellspacing="0" height="229" width="100%">
<tr>
<td width="12"></td>
<td><marquee direction="right" behavior="alternate" height="229" scrollamount="3" onmouseover=this.stop() onmouseout=this.start() width="730" class="img">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><a href="#"><img alt="大连送餐信息网" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230233Gb5a.jpg" width="201"/></a></td>
<td><a href="#"><img alt="大连送餐信息网" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230224U11924.jpg" width="265" /></a></td>
<td><a href="#"><img alt="" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230224U11924.jpg" width="265" /></a></td>
<td><a href="#"><img alt="大连送餐信息网" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230224U11924.jpg" width="265" /></a></td>
<td><a href="#"><img alt="大连送餐信息网" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230224U11924.jpg" width="265" /></a></td>
<td><a href="#"><img alt="**" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230224U11924.jpg" width="265" /></a></td>
<td><a href="#"><img alt="大连送餐信息网" border="0" height="215" src="http://www.dlsongcan.com/uploads/allimg/091230/1_1230224U11924.jpg" width="265" /></a></td>
</tr>
</table>
</marquee>
</td>
<td width="12"></td>
</tr>
</table>
来源:oschina
链接:https://my.oschina.net/u/142267/blog/24319