• MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类) Ver 1.4


    /*MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类) Ver 1.4*

     制作时间:2006-08-29 (Ver 0.5)
     发布时间:2006-08-31 (Ver 0.8)
     更新时间:2006-12-11 (Ver 1.4)
     更新说明: + 加入功能 * 修正、完善
    1.4.061211
    + 鼠标悬停改变滚动方向 (鼠标悬停控制左右滚动)
    * 由于文档下载过慢而导致获取的高度/宽度不准确
    * 浏览器兼容问题 (IE、FF、Opera、NS、MYIE)
    1.2.060922
    + 指定范围间歇滚动
    * 程序调整
    * 连续间歇滚动停止的错误
    1.0.060901
    + 向下、向右滚动
    + 开始等待时间
    + 连续滚动
    * 调整时间单位
    * 滚动误差
    * 随机死循环
    * 加强性能
    * 程序优化
    0.8.060829
    翻屏不间断向上、向左滚动


     演示地址:http://www.popub.net/script/MSClass.html
     下载地址:http://www.popub.net/script/MSClass.js

     应用说明:页面包含<script type="text/javascript" src="MSClass.js"></script>

    创建实例:new Marquee("marquee",0,1,760,52,50,5000,3000)
    new Marquee("marquee",0,1,760,104,50,5000,3000,52)

    参数说明:marquee 容器ID
    0 向上滚动(0向上 1向下 2向左 3向右)
    1 滚动的步长(数值越大,滚动越快)
    760 容器可视宽度
    52 容器可视高度
    50 定时器(数值越小,滚动的速度越快 1000=1秒,建议不小于20)
    5000 间歇停顿延迟时间(0为不停顿,1000=1秒)
    3000 开始时的等待时间(0为不等待,1000=1秒)
    (52) 间歇滚动间距(可选,该数值与延迟均为0则为鼠标悬停控制)
     使用建议:
    1、建议直接赋予容器的显示区域的宽度和高度,如(<div id="marquee" style="760px;height:52px;">......</div>)
    2、建议为容器添加样式overflow = auto,如(<div id="marquee" style="760px;height:52px;overflow:auto;">......</div>)
    2、为了更准确的获取滚动区域的宽度和高度,请尽可能将各滚动单位直接赋予正确宽高度
    3、对于TABLE标记的横向滚动,需要对TABLE添加样式display = inline,如(<div id="marquee" style="760px;height:52px;overflow:auto;"><table style="display:inline">......</table></div>)
    4、对于翻屏滚动或间歇滚动,要注意各滚动单位间的间距,同时需要对容器的可视高度和可视宽度做好准确的设置,对于各滚动单位间的间距可以通过设置行间距或者单元格的高宽度来进行调整
    5、对于LI自动换行的问题暂时没有更好的解决办法,建议将其转换成表格(TABLE)的形式来达到同等的效果

    ***程序制作/版权所有:崔永祥(333) E-Mail:zhadan007@21cn.com 网址:http://www.popub.net***/

    <!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" lang="gb2312">
    <head>
    <head>
    <title> new document </title>
    <title>MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类) Ver 1.4 程序制作/版权所有:崔永祥(333)</title>
    <style>
    a,body,select
    {font-size:12px;text-decoration:none;}
    a,pre
    {color:#808080;}
    body
    {background:#efefef;}
    </style>
    <script type="text/javascript" src="http://www.popub.net/script/MSClass.js"></script>
    </head>
    <body>
    <pre>
    /*MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类) Ver 1.4*

     制作时间:2006-08-29 (Ver 0.5)
     发布时间:2006-08-31 (Ver 0.8)
     更新时间:2006-12-11 (Ver 1.4)
     更新说明: + 加入功能 * 修正、完善
        1.4.061211
            + 鼠标悬停改变滚动方向 (鼠标悬停控制左右滚动)
            * 由于文档下载过慢而导致获取的高度/宽度不准确
            * 浏览器兼容问题 (IE、FF、Opera、NS、MYIE)
        1.2.060922
            + 指定范围间歇滚动
            * 程序调整
            * 连续间歇滚动停止的错误
        1.0.060901
            + 向下、向右滚动
            + 开始等待时间
            + 连续滚动
            * 调整时间单位
            * 滚动误差
            * 随机死循环
            * 加强性能
            * 程序优化
        0.8.060829
              翻屏不间断向上、向左滚动


     演示地址:
    <href="http://www.popub.net/script/MSClass.html">http://www.popub.net/script/MSClass.html</a>
     下载地址:
    <href="http://www.popub.net/script/MSClass.js"><font color="red">http://www.popub.net/script/MSClass.js</font></a>

     应用说明:页面包含
    &lt;script type="text/javascript" src="MSClass.js">&lt;/script>

        创建实例:new Marquee("marquee",0,1,760,52,50,5000,3000)
             new Marquee("marquee",0,1,760,104,50,5000,3000,52)

        参数说明:marquee    容器ID
             0        向上滚动(0向上 1向下 2向左 3向右)
             1        滚动的步长(数值越大,滚动越快)
             760        容器可视宽度
             52        容器可视高度
             50        定时器(数值越小,滚动的速度越快 1000=1秒,建议不小于20)
             5000        间歇停顿延迟时间(0为不停顿,1000=1秒)
             3000        开始时的等待时间(0为不等待,1000=1秒)
             (52)        间歇滚动间距(可选,该数值与延迟均为0则为鼠标悬停控制)
     使用建议:
            1、建议直接赋予容器的显示区域的宽度和高度,如(
    &lt;div id="marquee" style="760px;height:52px;">&lt;/div>)
            2、建议为容器添加样式overflow = auto,如(
    &lt;div id="marquee" style="760px;height:52px;overflow:auto;">&lt;/div>)
            3、为了更准确的获取滚动区域的宽度和高度,请尽可能将各滚动单位直接赋予正确宽高度
            4、对于TABLE标记的横向滚动,需要对TABLE添加样式display = inline,如(
    &lt;div id="marquee" style="760px;height:52px;overflow:auto;">&lt;table style="display:inline">&lt;/table>&lt;/div>)
            5、对于翻屏滚动或间歇滚动,要注意各滚动单位间的间距,同时需要对容器的可视高度和可视宽度做好准确的设置,对于各滚动单位间的间距可以通过设置行间距或者单元格的高宽度来进行调整
            6、对于LI自动换行的问题暂时没有更好的解决办法,建议将其转换成表格(TABLE)的形式来达到同等的效果

    ***程序制作/版权所有:崔永祥(333) E-Mail:zhadan007@21cn.com 网址:http://www.popub.net***/
    </pre>
    <b>PCAS (Province City Area Selector 省、市、地区联动选择JS封装类) Ver 2.01 数据压缩完整版</b>&nbsp;<href="pcas.html"><font color="red">演示及下载</font></a><br><br>

    <br>

    <b>不间断滚动应用实例演示:</b>&nbsp;<href="MSClass.js"><font color="red">下载</font></a><br><br>



    <fieldset style="padding:5px;">
    <legend>不间断滚动实例</legend>
    <center>
    鼠标悬停滚动
    <nobr>
    <div id="marqueedivmouse" style="760px;overflow:auto;"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></div>
    </nobr>
    <br>
    <br>
    文字翻屏滚动
    <div id="textdiv" style="border:1 solid #c0c0c0;text-align:left;760px;height:42px;overflow:hidden;">
    演示地址:
    <href="http://www.popub.net/script/MSClass.html">http://www.popub.net/script/MSClass.html</a><br>
    下载地址:
    <href="http://www.popub.net/script/MSClass.js"><font color="red">http://www.popub.net/script/MSClass.js</font></a><br>
    PCAS (Province City Area Selector 省、市、地区联动选择JS封装类) Ver 2.01 数据压缩完整版
    </b>&nbsp;<href="pcas.html"><font color="red">演示及下载</font></a><br>
    ***程序制作/版权所有:崔永祥(333) E-Mail:zhadan007@21cn.com 网址:http://www.popub.net***/
    <br>
    </div>
    <br>
    <br>
    文字间歇滚动
    <div id="textdiv1" style="border:1 solid #c0c0c0;text-align:left;760px;height:42px;overflow:hidden;">
    演示地址:
    <href="http://www.popub.net/script/MSClass.html">http://www.popub.net/script/MSClass.html</a><br>
    下载地址:
    <href="http://www.popub.net/script/MSClass.js"><font color="red">http://www.popub.net/script/MSClass.js</font></a><br>
    PCAS (Province City Area Selector 省、市、地区联动选择JS封装类) Ver 2.01 数据压缩完整版
    </b>&nbsp;<href="pcas.html"><font color="red">演示及下载</font></a><br>
    ***程序制作/版权所有:崔永祥(333) E-Mail:zhadan007@21cn.com 网址:http://www.popub.net***/
    <br>
    </div>
    <br>
    <br>
    向上翻屏滚动
    <div id="marqueediv1" style="760px;height:52px;overflow:hidden;">
    <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
    </table>
    </div>
    <br>
    <br>
    向下翻屏滚动
    <div id="marqueediv2" style="760px;height:52px;overflow:hidden;">
    <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
    </table>
    </div>
    <br>
    <br>
    向左翻屏滚动
    <nobr>
    <div id="marqueediv3" style="760px;height:52px;overflow:hidden;"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></div>
    </nobr>
    <br>
    <br>
    向右翻屏滚动
    <nobr>
    <div id="marqueediv4" style="760px;height:52px;overflow:hidden;"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></div>
    </nobr>
    <br>
    <br>
    向上连续滚动
    <div id="marqueediv5" style="760px;height:52px;overflow:hidden;">
    <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
    </table>
    </div>
    <br>
    <br>
    向左连续滚动
    <nobr>
    <div id="marqueediv6" style="760px;height:52px;overflow:hidden;"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></div>
    </nobr>
    <br>
    <br>

    向上间歇滚动
    <div id="marqueediv7" style="760px;height:52px;overflow:hidden;">
    <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
      
    <tr>
        
    <td height="52" align="center" valign="middle"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></td>
      
    </tr>
    </table>
    </div>
    <br>
    <br>

    向左间歇滚动
    <nobr>
    <div id="marqueediv8" style="760px;height:52px;overflow:hidden;"><img src="http://www.popub.net/script/images/yaode.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/qtrjczh.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/gucang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/bmfd.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/guangming.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/liangan.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/klk.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/old.gif" width="150" height="50" border="0" style="border-color:#cccccc" hspace="1"><img src="http://www.popub.net/script/images/yangyang.gif" width="150" height="50" border="0" hspace="1"><img src="http://www.popub.net/script/images/hanch.gif" width="150" height="50" border="0" hspace="1"></div>
    </nobr>
    <br>
    <br>
    </center>
    <script defer>
    new Marquee("marqueedivmouse",2,4,760,52,20,0,3000,0)
    new Marquee("textdiv",0,1,760,42,20,4000,5000)
    new Marquee("textdiv1",0,1,760,42,20,4000,5000,14)
    new Marquee("marqueediv1",0,1,760,52,50,4000,500)
    new Marquee("marqueediv2",1,2,760,52,50,4000,500)
    new Marquee("marqueediv3",2,20,760,50,20,4000,5000)
    new Marquee("marqueediv4",3,10,760,52,20,4000,500)
    new Marquee("marqueediv5",0,1,760,52,30,0,0)
    new Marquee("marqueediv6",2,1,760,52,20,0,0)
    new Marquee("marqueediv7",0,1,760,104,50,4000,500,52)
    new Marquee("marqueediv8",2,20,760,50,20,4000,5000,152)
    </script>

    </fieldset>

    </body>
    </html>
  • 相关阅读:
    Android中View绘制流程以及invalidate()等相关方法分析
    开机黑屏 仅仅显示鼠标 电脑黑屏 仅仅有鼠标 移动 [已成功解决]
    servlet上传文件报错(一)
    白话经典算法系列之六 高速排序 高速搞定
    POJ1177+线段树+扫描线
    tensorflow compile
    算法编程题的心得体会
    算法编程题的心得体会
    标识变量的使用
    标识变量的使用
  • 原文地址:https://www.cnblogs.com/flyfish/p/603024.html
Copyright © 2020-2023  润新知