您当前所在位置:    首页 > 代码集锦
返回
无间系滚动代码
时间:2020/11/1    来自:臻心网络科技
把以下代码插到<body></body>之间!

<table width="90%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="100%" height="180" align="center"><div id="demo" style="overflow: hidden; height: 200px; width: 740px">
<table width="923" border="0" align="left" cellpadding="0" cellspace="0">
<tr>
<td width="734" valign="top" id="demo1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img width="244" height="174">a</td>
<td><img width="244" height="174">a</td>
<td><img width="244" height="174">a</td>
<td><img width="244" height="174"></td>
</tr>
</table>
     </td>
<td width="12" valign="top" id="demo2"></td>
</tr>
</table>

</div>
<script lanaguage="javascript">
<!--
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=function(){clearInterval(MyMar)}
demo.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
//-->
</script>
</td>
</tr>
</table>
 
关注微信公众号
 

在线咨询

一键通话

联系我们