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>