高手大侠看看啊:制作网页流动图片的问题

来源:百度知道 编辑:UC知道 时间:2024/06/30 04:53:03
我学制作网页用的是DIV+CSS布局的,然后想插入一段流动图片的代码:
<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=100
src="images/1.jpg"
width=160><IMG height=100
src="images/2.jpg"
width=150><IMG height=100
src="images/3.jpg"
width=150><IMG height=100
src="images/4.jpg"
width=150>
</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=functio

改成这样:
<div id="demo" style="overflow:hidden; height:150; width:460; bgcolor="#FEE8C1"";>
<table align="left" cellpadding=0 cellspace=0 border=0 width="460">
<tr>
<td id="demo1" valign="top" bgcolor="#FEE8C1">
<table width="460" headers="100">
<tr>
<td><IMG height="100" src="images/1.jpg" width="160"/></td>
<td><IMG height="100" src="images/2.jpg" width="150"/></td>
<td><IMG height="100" src="images/3.jpg" width="150"/></td>
<td><IMG height="100" src="images/4.jpg" width="150"/></td>
</tr></table>
<td id="demo2" valign="top"></td>
</tr>