当前位置: 代码迷 >> HTML/CSS >> 小弟我给了marquee direction="up" 图片从下住下动,可是图片最开始出来的时候在最上端,下面都空着在,如何样让它一出来就显示在最下面
  详细解决方案

小弟我给了marquee direction="up" 图片从下住下动,可是图片最开始出来的时候在最上端,下面都空着在,如何样让它一出来就显示在最下面

热度:132   发布时间:2012-08-03 00:12:14.0
我给了marquee direction="up" 图片从上住上动,可是图片最开始出来的时候在最下端,上面都空着在,怎么样让它一出来就显示在最上面?
代码:
<marquee direction="up" behavior="scroll" scrollamount="5" scrolldelay="200" onmousemove="this.stop()" onmouseout="this.start()">
<table width="386" cellspacing="0" cellpadding="0" class="tab">
  <tr>
  <td width="130" height="50" align="center"><a href="#"><img src="images/qy1_03.gif" alt=" " /></a></td>
  <td align="center"><a href="#"><img src="images/qy2_03.gif" alt="" class="qy_img" /></a></td>
  <td align="center"><a href="#"><img src="images/qy3_03.gif" alt="" /></a></td>
  </tr>
  <tr>
  <td width="130" height="50" align="center"><a href="#"><img src="images/qy4_03.gif" alt=" " /></a></td>
  <td align="center"><a href="#"><img src="images/qy5_03.gif" alt="" /></a></td>
  <td align="center"><a href="#"><img src="images/qy6_03.gif" alt="" /></a></td>
  </tr>
  <tr>
  <td width="130" height="50" align="center"><a href="#"><img src="images/qy7_03.gif" alt=" " /></a></td>
  <td align="center"><a href="#"><img src="images/qy8_03.gif" alt="" /></a></td>
  <td align="center"><a href="#"><img src="images/qy9_03.gif" alt="" /></a></td>
  </tr>
  <tr>
  <td width="130" height="50" align="center"><a href="#"><img src="images/qy10_03.gif" alt=" " /></a></td>
  <td align="center"><a href="#"><img src="images/qy11_03.gif" alt="" /></a></td>
  <td align="center"><a href="#"><img src="images/qy12_03.gif" alt="" class="qy_img" /></a></td>
  </tr>
</table>
</marquee>


各位高手,看看怎么改?

------解决方案--------------------
<table width="386" cellspacing="0" cellpadding="0" class="tab" style="margin-top:-200px;">
------解决方案--------------------
HTML code
IE好用。FF自己改改
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>无标题 1</title>
</head>

<body  ><input type="hidden" id="hfValue"/>
<table width="386" cellspacing="0" cellpadding="0" class="tab" id="tbShow">
  <tr>
    <td width="130" height="50" align="center"> <a href="#"> <img src="images/qy1_03.gif" alt=" " /> </a> </td>
    <td align="center"> <a href="#"> <img src="images/qy2_03.gif" alt="" class="qy_img" /> </a> </td>
    <td align="center"> <a href="#"> <img src="images/qy3_03.gif" alt="" /> </a> </td>
  </tr>
  <tr>
    <td width="130" height="50" align="center"> <a href="#"> <img src="images/qy4_03.gif" alt=" " /> </a> </td>
    <td align="center"> <a href="#"> <img src="images/qy5_03.gif" alt="" /> </a> </td>
    <td align="center"> <a href="#"> <img src="images/qy6_03.gif" alt="" /> </a> </td>
  </tr>
  </table> 
  <script type="text/javascript">
function test()
{
document.getElementById("hfValue").value=document.getElementById('tbShow').outerHTML;
document.getElementById("tbShow").style.display='none';
document.write("<marquee id='gundong' direction='up' behavior='scroll' scrollamount='5' scrolldelay='200' onmousemove='this.stop()'onmouseout='this.start()'>"+document.getElementById("hfValue").value+"</marquee>");
}
setInterval("test()",1000);
</script>

  </body>

</html> 
  相关解决方案