zoukankan      html  css  js  c++  java
  • 不间断滚动

    <!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>图片不间断向左滚动JS代码</title>
    <style>
    #demo{width:728px; overflow:hidden; margin:0px auto}</style>
    </head>
    <body>
    <div id="demo">
        <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >
            <tr><td valign=top bgcolor=ffffff id=marquePic1>
        <table width='100%' border='0' cellspacing='0'><tr>
    <td align=center><a href='http://www.16sucai.com'><img src="images/01.jpg" width=232 height=139 border=0><br><br>01</a></td>
    <td align=center><a href='http://www.16sucai.com'><img src="images/02.jpg" width=232 height=139 border=0><br><br>02</a></td>
    <td align=center><a href='http://www.16sucai.com'><img src="images/03.jpg" width=232 height=139 border=0><br><br>03</a></td>
    <td align=center><a href='http://www.16sucai.com'><img src="images/04.jpg" width=232 height=139 border=0><br><br>04</a></td>
    <td align=center><a href='http://www.16sucai.com'><img src="images/05.jpg" width=232 height=139 border=0><br><br>05</a></td>
    </tr></table>
            </td><td id=marquePic2 valign=top></td></tr>
        </table></div>
        <div style="height:90px; 728px; padding-top:10px; margin:0px auto;">
    <script type="text/javascript"><!--
    google_ad_client = "ca-pub-6110696270771103";
    /* 全站大横幅 */
    google_ad_slot = "4968847295";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script> <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </div>
    <script type="text/javascript">
    var speed=50 
    marquePic2.innerHTML=marquePic1.innerHTML 
    function Marquee(){ 
    if(demo.scrollLeft>=marquePic1.scrollWidth){ 
    demo.scrollLeft=0 
    }else{ 
    demo.scrollLeft++ 
    } 
    } 
    var MyMar=setInterval(Marquee,speed) 
    demo.onmouseover=function() {clearInterval(MyMar)} 
    demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
    </script>
    
    </body>
    </html>
  • 相关阅读:
    LeetCode 12. Integer to Roman
    个人博客09
    个人博客08
    人机交互之我的输入法
    学习进度条(第六周)
    《梦断代码》阅读笔记02
    个人博客07
    学习进度条(第五周)
    个人博客06
    个人博客05
  • 原文地址:https://www.cnblogs.com/zywf/p/4583648.html
Copyright © 2011-2022 走看看