注册 登录
编程论坛 WEB前端(UI)

如何制作一串从右到左移动的照片

bzping 发布于 2005-10-18 10:55, 5480 次点击
看到人家的网站有这样一幅图,在表格插入很多图,如何在dreamweamer中实现这些图片从右到左不停移动啊?求教各位高手!
14 回复
#2
bestlife2005-10-18 10:58
可以参考一下实现滚动字幕的脚本
#3
bestlife2005-10-18 11:07
<SCRIPT language=javascript>                                                         
document.writeln('<marquee width=382 trueSpeed scrollAmount=1 scrollDelay=50 behavior=alternate onmouseover=this.stop() onmouseout=this.start()>')                                                         
</SCRIPT>
#4
oyyunlong2005-10-18 12:04
对~~~滚动字幕的脚本,把文字换成图片的相对路径就OK了~
#5
bzping2005-10-19 15:18
谢谢大家!还有点疑问,如果照字幕做的话,等图片移过去之后不是出现空白了吗,我想图片一直连着移动可以吗,不知道是不是还有其它办法没有
#6
bestlife2005-10-19 15:34
字幕也有循环字幕的啊
#7
bzping2005-10-20 10:10
字幕是循环的不会错,可是它有一定的延迟时间啊,等移过之后要出现一定时间的空白,然后过又重新出现,这怎么处理啊,谢谢!
#8
bestlife2005-10-20 11:34
那你看我这样的想法可行吗:先使图片左移,到最后一张图片再右移,如此循环往复,这样只会在第一次左移时有一小端空白。
#9
蓝色枫叶2005-10-23 11:10
[fly]受教[/fly]
#10
蓝色枫叶2005-10-23 11:15
[fly][GLOW=255,red,2]试一下   红的[/glow][/fly]
#11
蓝色枫叶2005-10-23 11:43
[fly]" border="0" />[/fly]
图片不能使用本地地址,要使用网站地址如http://  ;  ftp://

[此贴子已经被bestlife于2005-10-24 12:20:24编辑过]


#12
giggs07112005-10-31 13:56

<!--专题图片精选 begin-->
<!--滚动图片资料 begin-->
<style type="text/css">
.RollPic{
border:1px solid #999999;
padding:9px 9px 9px 9px;
background-color:#fff;
overflow:hidden;
}

.RollTitle{color:#fff;line-height:19px;}
</style>
<table width=750 cellspacing=0 bgcolor=#ffffff>
<tr>
<td width=1 height=2></td>
<td></td>
<td width=1></td>
</tr>
<tr>
<td></td>
<td>

<table width=100% cellspacing=0 style='border:1px solid #9F9F9F;'>
<tr align=center>
<td width=27 height=140 bgcolor=#7C7C7C class='RollTitle'><b>滚<br/>动<br/>图<br/>片</b></td>
<td bgcolor=#CCCCCC>
<div id=demo style="overflow:hidden;height:140px;width:700px;margin-top:12px;">

<table width= cellspacing=0>
<tr>
<td id=demo1>
<table cellspacing=0>
<tr>
<!--滚动图片 begin-->
<td class=RollPic><a href=/z/chinaoverseas/photo/21206/index.shtml target="_blank"><img src=http://image2.sina.com.cn/ty/g/p/2005-10-28/U1022P6T12D1849520F44DT20051028232916_small_h.jpg border=1 alt='阿德莱德险胜曲圣卿发威'></a></td>
<td width=4><img width=4></td>
<td class=RollPic><a href=/z/chinaoverseas/photo/21153/index.shtml target="_blank"><img src=http://image2.sina.com.cn/ty/g/p/2005-10-27/U329P6T12D1847136F44DT20051027111027_small_h.jpg border=1 alt='德国杯邵佳一进球1860晋级'></a></td>
<td width=4><img width=4></td>
<td class=RollPic><a href=/z/chinaoverseas/photo/21143/index.shtml target="_blank"><img src=http://image2.sina.com.cn/ty/j/p/2005-10-27/U1489P6T12D1846210F44DT20051027015255_small_h.jpg border=1 alt='杜威回国欲汇合国足'></a></td>
<td width=4><img width=4></td>
<td class=RollPic><a href=/z/chinaoverseas/photo/21022/index.shtml target="_blank"><img src=http://image2.sina.com.cn/ty/g/p/2005-10-23/U1022P6T12D1839816F44DT20051023024326_small_h.jpg border=1 alt='孙继海难阻阿森纳取胜'></a></td>
<td width=4><img width=4></td>
<td class=RollPic><a href=/z/newphoto/photo/21000/index.shtml target="_blank"><img src=http://image2.sina.com.cn/ty/g/p/2005-10-22/U1533P6T12D1839147F44DT20051022202221_small_h.jpg border=1 alt='澳超曲圣卿表现不俗'></a></td>
<td width=4><img width=4></td>
<td class=RollPic><a href=/z/chinaoverseas/photo/20950/index.shtml target="_blank"><img src=http://image2.sina.com.cn/ty/g/p/2005-10-21/U1022P6T12D1837335F44DT20051021213650_small_h.jpg border=1 alt='杜威训练中热情高涨'></a></td>
<td width=4><img width=4></td>

<!--滚动图片 end-->
</tr>
</table>

</td>
<td id=demo2></td>
</tr>
</table>

</div>
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td height=8></td>
<td></td>
<td></td>
</tr>
</table>

<script>
var speed=10//速度数值越大速度越慢
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=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
<!--滚动图片资料 end-->
<!--专题图片精选 end-->

#13
a_men2005-11-07 11:55
14楼的 很不错
#14
ncnongmin2008-06-30 11:04
<marquee> </marquee>
#15
dahantianzi2008-07-01 18:39
11111
<html>
<head>
<script language="javascript">
document.writeIn('<marquee width=800 heigh=100 scrollAmount=1 scrollDelay=50 behavior=alternate>这里放图片</marquee>')
</script>
</head>
</html>
1