▲※如何让图片向右移动 和向左一样???※▲

认真为自己 2008-10-24 12:20:46

<table width="411" height="74" border="0">
<tr>
<td>
<div id="xmwd" style="overflow:hidden;width:409px;color:#ff0000">
<table align=left cellpadding=0 cellspace=0 border=0 width="130">
<tr >
<td id=xmwd1 valign=top>
<table border=0 cellpadding=0 cellspacing=0 >
<tr >
<td > <a href=http://www.qpsh.com target=_blank style="margin:0px 2px "> <img src="http://www.qpsh.com/icon/BS9097.jpg" width="130"height=100 border=0 ></a ></td >
<td > <a href=http://www.qpsh.com target=_blank style="margin:0px 2px "> <img src="http://www.qpsh.com/icon/BS9097.jpg" width="130"height=100 border=0 ></a ></td >
<td > <a href=http://www.qpsh.com target=_blank style="margin:0px 2px "> <img src="http://www.qpsh.com/icon/BS9097.jpg" width="130"height=100 border=0 ></a ></td >
<td > <a href=http://www.qpsh.com target=_blank style="margin:0px 2px "> <img src="http://www.qpsh.com/icon/BS9097.jpg" width="130"height=100 border=0 ></a ></td >
</tr >
</table >
<td id=xmwd2 valign=top width="1"></td >
</tr >
</table >
</div >
<script >
var speed=50//速度数值越大速度越慢
xmwd2.innerHTML=xmwd1.innerHTML
function Marquee(){
if(xmwd2.offsetWidth-xmwd.scrollLeft <=0)
xmwd.scrollLeft-=xmwd1.offsetWidth
else{
xmwd.scrollLeft+=3
}
}
var MyMar=setInterval(Marquee,speed)
xmwd.onmouseover=function() {clearInterval(MyMar)}
xmwd.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</td>
</tr>
</table>
...全文
291 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
兼容FF,JS不间断循环滚动,包含自滚动,左右自滚动,点击左右滚动,鼠标暂停效果:http://blog.csdn.net/chinmo/archive/2008/09/12/2915629.aspx
sy_binbin 2008-10-24
  • 打赏
  • 举报
回复
演示地址:http://www.popub.net/script/MSClass.html

看看这个
sy_binbin 2008-10-24
  • 打赏
  • 举报
回复
演示地址:http://www.popub.net/script/MSClass.html

看看这个
sy_binbin 2008-10-24
  • 打赏
  • 举报
回复
演示地址:http://www.popub.net/script/MSClass.html

看看这个

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧