日期:2014-05-17  浏览次数:20902 次

请教图片移动问题
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tbody>
  <tr>
  <td height="27" width="89%">
  <strong>&nbsp;师资力量</strong>
  </td>
  </tr>
  <tr>
  <td bgcolor="#e44d92" height="1" colspan="2">
  </td>
  </tr>
  <tr>
  <td colspan="2">
  <div style="width:900px; height: 138px; overflow: hidden" id="demo">
  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"
  height="138px">
  <tbody>
  <tr>
  <td id="demo1">
  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"
  height="138px">
  <tbody>
  <tr>
  <?php echo dt_picture(46,20,0,0,2);?>
  </tr>
  </tbody>
  </table>
  </td>
  <td id="demo2" width="900"></td>
  </tr>
  </tbody>
  </table>
  </div>

  <script>
  var speed = 20
  demo2.innerHTML = demo1.innerHTML
  function Marquee1() {
  if (demo2.offsetWidth - demo.scrollLeft <= 0)
  demo.scrollLeft -= demo1.offsetWidth
  else {
  demo.scrollLeft++
  }
  }
  var MyMar1 = setInterval(Marquee1, speed)
  demo.onmouseover = function() { clearInterval(MyMar1) }
  demo.onmouseout = function() { MyMar1 = setInterval(Marquee1, speed) }  
  </script>

  </td>
  </tr>
  <tr>
  <td colspan="2">&nbsp;
   
  </td>
  </tr>
  </tbody>