急急急急!在线求求图片滚动代码,要HTML做的代码
发布网友
发布时间:2022-05-02 21:04
我来回答
共2个回答
热心网友
时间:2022-06-27 05:30
根据楼上朋友的修改,能给你直接使用的代码
<head>
<meta http-equiv="Content-Language" content="zh-cn">
</head>
<td>
<div align="center">
<div id=demo style=overflow:hidden;height:155px;width:690px;>
<table align=left cellpadding=0 cellspace=0 border=0 width="690">
<tr>
<td id=demo1 valign=top> <div align="center"><table border="0" cellpadding="0" cellspacing="0" width="690"><tr><td align="center" valign="top">
<a target="_blank" title="说明1" href="http://aiyiya.cn"><img border="0" src="http://img.alimama.cn/defboards/default/19/120x240.jpg" width="120" height="240"></a><a target="_blank" title="说明2" href="http://our178.com.cn"><img border="0" src="http://img.alimama.cn/a/2008-07-29/175729/109148500857290557291.gif" width="120" height="240"></a><a target="_blank" title="说明" href="http://music.aiyiya.cn"><img border="0" src="http://img.alimama.cn/a/2008-07-29/175729/109148500857290557291.gif" width="120" height="240"></a><a target="_blank" title="说明" href="http://down.aiyiya.cn"><img border="0" src="http://img.alimama.cn/a/2008-07-29/175729/109148500857290557291.gif" width="120" height="240"></a></td></tr></table></div></td>
<td id=demo2 valign=top></td>
</tr>
</table>
<script>
var speed=15
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo2.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</div>
</div>
</td>
图片自己添加,说明、连接自己修改
想要添加更多只要修改下面代码复制粘贴在</a>后面即可
<a target="_blank" title="说明文字" href="要跳转的连接地址"><img border="0" src="要添加的图片" width="图片宽度" height="图片高度"></a>
热心网友
时间:2022-06-27 05:30
<td>
<div align="center">
<div id=demo style=overflow:hidden;height:155px;width:690px;>
<table align=left cellpadding=0 cellspace=0 border=0 width="690">
<tr>
<td id=demo1 valign=top> <div align="center"><table border="0" cellpadding="0" cellspacing="0" width="690"><tr><td align="center" valign="top">这里放图片及文字的内容</td></tr></table></div></td>
<td id=demo2 valign=top></td>
</tr>
</table>
<script>
var speed=15
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo2.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</div>
</div>
</td>