不间断滚动特效的简单测试特效代码


点击(此处)折叠或打开

  1. <div id=\"marquee_demo\" style=\"overflow:hidden;width:500px;text-align:center;border:1px solid #ccc\">
  2. <table cellspacing=\"0\" cellpadding=\"3\" align=\"center\" border=\"0\">
  3. <tr>
  4. <td id=\"marquee_product1\" valign=\"top\">
  5. <table width=\"800\" height=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  6. <tr>
  7. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">1</td>
  8. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">2</td>
  9. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">3</td>
  10. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">4</td>
  11. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">5</td>
  12. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">6</td>
  13. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">7</td>
  14. <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">8</td>
  15. </tr>
  16. </table>
  17. </td>
  18. <td id=\"marquee_product2\" valign=\"top\"></td>
  19. </tr>
  20. </table>
  21. </div>
  22. <script type=\"text/javascript\">
  23. var speed=30;
  24. marquee_product2.innerHTML=marquee_product1.innerHTML;
  25. function Marquee(){
  26. if(marquee_demo.scrollLeft>=marquee_product1.scrollWidth){
  27. marquee_demo.scrollLeft=0;
  28. }
  29. else{
  30. marquee_demo.scrollLeft++;
  31. }
  32. }
  33. var MyMar=setInterval(Marquee,speed);
  34. marquee_demo.onmouseover=function(){clearInterval(MyMar);}
  35. marquee_demo.onmouseout=function(){MyMar=setInterval(Marquee,speed www.zqzqjd.com  );}
  36. </script>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29737856/viewspace-1302670/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29737856/viewspace-1302670/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值