网页制作如何让图片从右到左循环移动,怎么修改一下,谢谢
<styletype="text/css"><!--TD{FONT-SIZE:12px;}</style></head><body><divid=demostyle="O...
<style type="text/css">
<!--
TD {FONT-SIZE: 12px;}
</style>
</head>
<body>
<div id=demo style="OVERFLOW: hidden; WIDTH: 760px; align: center">
<table cellspacing="0" cellpadding="0" align="center"
border="0">
<tbody>
<tr>
<td id="marquePic1" valign="top">
<table width="958" height="130" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="95" height="110" align="center">1</td>
<td width="95" align="center">2</td>
<td width="95" align="center">3</td>
<td width="95" align="center">4</td>
<td width="95" align="center">5</td>
<td width="95" align="center">6</td>
<td width="95" align="center">7</td>
<td width="95" align="center">8</td>
</tr>
<tr>
<td height="20" align="center" bgcolor="#0099FF">0</td>
<td align="center">a</td>
<td align="center">b</td>
<td align="center">c</td>
<td align="center">d</td>
<td align="center">e</td>
<td align="center">f</td>
<td align="center" bgcolor="#FF6633">g</td>
</tr>
</table>
</td>
<td id="marquePic2" valign="top"></td>
</tr>
</tbody>
</table>
</div>
<p>
<script type=text/javascript>
var speed=30
marquePic2.innerHTML=marquePic1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(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> 展开
<!--
TD {FONT-SIZE: 12px;}
</style>
</head>
<body>
<div id=demo style="OVERFLOW: hidden; WIDTH: 760px; align: center">
<table cellspacing="0" cellpadding="0" align="center"
border="0">
<tbody>
<tr>
<td id="marquePic1" valign="top">
<table width="958" height="130" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="95" height="110" align="center">1</td>
<td width="95" align="center">2</td>
<td width="95" align="center">3</td>
<td width="95" align="center">4</td>
<td width="95" align="center">5</td>
<td width="95" align="center">6</td>
<td width="95" align="center">7</td>
<td width="95" align="center">8</td>
</tr>
<tr>
<td height="20" align="center" bgcolor="#0099FF">0</td>
<td align="center">a</td>
<td align="center">b</td>
<td align="center">c</td>
<td align="center">d</td>
<td align="center">e</td>
<td align="center">f</td>
<td align="center" bgcolor="#FF6633">g</td>
</tr>
</table>
</td>
<td id="marquePic2" valign="top"></td>
</tr>
</tbody>
</table>
</div>
<p>
<script type=text/javascript>
var speed=30
marquePic2.innerHTML=marquePic1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(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> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询