图片横向自动滚动显示

css 文件


@charset "utf-8";
/* CSS Document */
body,td,th {
	font-size: 12px;
	color: #666666;
}
img{ border:0px;}
body {
	margin-left: 0px;
	margin-top: 35px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a:link {
	color: #666666;
	text-decoration: none;
}
a:visited {
	color: #666666;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	color: #FF0000;
	text-decoration: none;
}
#demo{width:728px; overflow:hidden; margin:0px auto}


js代码


var speed=50 
marquePic2.innerHTML=marquePic1.innerHTML 
function Marquee(){ 
if(demo.scrollLeft>=marquePic1.scrollWidth){ 
demo.scrollLeft=0 
}else{ 
demo.scrollLeft++ 
} 
} 
var MyMar=setInterval(Marquee,speed) 
demo.οnmοuseοver=function() {clearInterval(MyMar)} 
demo.οnmοuseοut=function() {MyMar=setInterval(Marquee,speed)} 


HTML 代码


<div id="demo">
	<table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >
		<tr><td valign=top bgcolor=ffffff id=marquePic1>
	<table width='100%' border='0' cellspacing='0'><tr>
<td align=center><a href=''><img src="images/01.jpg" width=232 height=139 border=0><br><br>01</a></td>
<td align=center><a href=''><img src="images/02.jpg" width=232 height=139 border=0><br><br>02</a></td>
<td align=center><a href=''><img src="images/03.jpg" width=232 height=139 border=0><br><br>03</a></td>
<td align=center><a href=''><img src="images/04.jpg" width=232 height=139 border=0><br><br>04</a></td>
<td align=center><a href=''><img src="images/05.jpg" width=232 height=139 border=0><br><br>05</a></td>
</tr></table>
		</td><td id=marquePic2 valign=top></td></tr>
	</table></div>
    <div style="height:90px; width:728px; padding-top:10px; margin:0px auto;">
</div>






  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值