通过两个一摸一样的TABLE来实现无间隙播放

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD><BODY>
    <marquee id=mq1  direction=up >
    <ul>
    <li>昏睡百年,国人渐已醒
    <li>睁开眼吧,小心看吧
    <li>哪个愿臣虏自认
    <li>因为畏缩与忍让
    <li>人家骄气日盛
    <li>开口叫吧,高声叫吧
    <li>这里是全国皆兵
    <li>历来强盗要侵入
    <li>最终必送命
    <li>万里长城永不到
    <li>千里黄河水滔滔
    <li>江山秀丽叠彩锋岭
    <li>问我国家哪像染病
    <li>冲开血路,挥手上吧
    <li>要致力国家中兴
    <li>岂让国土再遭践踏
    <li>个个负起使命
    <li>这睡狮已渐已醒
    </ul>
    </marquee>
    <SCRIPT language=JavaScript>
    function mq1stop(){
    mq1.stop();
    window.setTimeout("mq1start()",8000)
    }
    function mq1start(){
    mq1.start();
    window.setTimeout("mq1stop()",4000)
    }
    mq1start();
    </SCRIPT>
    </BODY>
    </HTML>
      

  2.   

    有。
    http://ucren.com/DronFw/Example/ScrollBox.html<style type="text/css">
    *
    {
    font-size:12px;
    }
    #scrollBox
    {
    width:250px;
    height:20px;
    line-height:20px;
    overflow:hidden;
    background-color:#eee;
    }
    #scrollBox2
    {
    width:280px;
    height:60px;
    line-height:20px;
    overflow:hidden;
    background-color:#eee;
    }
    </style>
    单行例子:(每屏一行)<br><br>
    <div id="scrollBox">
    中国去年进口原油 11%来自上合成员<br />
    美:中国对台湾立场 似转趋和缓<br />
    美制裁四家中国公司 中方表示强烈不满<br />
    中伊关系加温 大陆波斯餐厅开幕
    </div><br>多行例子:(每屏三行)<br><br>
    <div id="scrollBox2">
    为何暂停UN登记武器转让 中方做解释<br>
    追悼空军运输机遇难者 胡锦涛送花圈<br>
    中国控制互联网?外交部发言人驳斥<br>
    美国移民局逮2179人 包括1华人蛇头<br>
    奇男子能嚼咽双刃刀片 用鼻子喝茶<br>
    男子持塑料玩具枪 劫走四十多吨铜(图)<br>
    餐馆当街宰小猫做肉丸 场面血腥(图)<br>
    男子软禁妻子近5年 称是替其驱妖魔<br>
    男子杀死同居女友 与腐尸共宿八天<br>
    年轻妻子欲卖肾救夫 88篇日记感人<br>
    曾志伟父亲节双喜临门 获美荣誉博士
    </div><Script type="text/JavaScript">
    //类内容
    ScrollBox = function (uid)
    {
    this.scrollBox = document.getElementById(uid);
    this.scrollBoxHeight = this.scrollBox.clientHeight;
    this.scrollBoxInner = this.scrollBox.innerHTML;
    this.scrollCol = this.scrolln = 0;
    this.setScroll = function ()
    {
    this.scrollBox.scrollTop = this.scrollCol + this.scrolln;
    if(this.scrolln==this.scrollBoxHeight)
    return this.addScroll()
    else
    this.scrolln ++;
    var o = this;
    function m(){o.setScroll();}
    setTimeout(m,20);
    }
    this.addScroll = function ()
    {
    this.scrollBox.innerHTML += "<br>" + this.scrollBoxInner;
    this.scrollCol = this.scrollBox.scrollTop;
    this.scrolln = 0;
    var o = this;
    function m(){o.setScroll();}
    setTimeout(m,1000);
    }
    this.addScroll();
    }//使用方法
    new ScrollBox("scrollBox");
    new ScrollBox("scrollBox2");
    </Script>
      

  3.   

    这个你可以满意吧?在CSS内容中自己定义好高度就行。
      

  4.   

    类似网易旅游频道的效果,阿里巴巴那改来的
    ===================================================================================
    <SCRIPT language=JavaScript src="inc/TopImgToggle.js"></SCRIPT>
    <% 
      sqlt="select top 4 id,bpic from tour order by id desc"
      set rst=conn.execute(sqlt)
      if not rst.eof then
      i=1
    %>
                  <TABLE width="100%" border=0 align="center" cellPadding=0 cellSpacing=0>
                    <TBODY>
    <tr>
       <td height="10" bgcolor="#F7F7F7" colspan="9"></td>
       </tr>
                      <TR>
                        <TD  colSpan="9" align="center" bgcolor="#F7F7F7"><DIV id=oTransContainer 
                style="FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0, motion='forward'); WIDTH: 480px; HEIGHT: 220px">
                <% do while not rst.eof  %>
                            <A href="view.asp?id=<%=rst("id")%>" target=_blank><IMG id=oDIV<%=i%> style="DISPLAY: none;"  height=220 src="<%=rst("bpic")%>" width=480 border=0></A>
                <%
    i=i+1
    rst.movenext
    loop
    %>
                        </DIV></TD>
                      </TR>
                      <TR vAlign=top align=middle height=25 bgcolor="#F7F7F7">
                        <TD width=82 ></TD>
                        <TD width=26 height=19 ><A href="javascript:toggleTo(1)"><IMG id=A1_1 
                height=19 src="images/tu1_1.gif" width=26 border=0></A><A 
                href="javascript:toggleTo(1)"><IMG id=A2_1 style="DISPLAY: none" 
                height=19 src="images/tu1_2.gif" width=26 border=0></A></TD>
                        <TD width=3></TD>
                        <TD width=26 height=19><A href="javascript:toggleTo(2)"><IMG id=A2_2 
                height=19 src="images/tu2_2.gif" width=26 border=0></A><A 
                href="javascript:toggleTo(2)"><IMG id=A1_2 style="DISPLAY: none" 
                height=19 src="images/tu2_1.gif" width=26 border=0></A></TD>
                        <TD width=3></TD>
                        <TD width=26 height=19><A href="javascript:toggleTo(3)"><IMG id=A2_3 
                height=19 src="images/tu3_2.gif" width=26 border=0></A><A 
                href="javascript:toggleTo(3)"><IMG id=A1_3 style="DISPLAY: none" 
                height=19 src="images/tu3_1.gif" width=26 border=0></A></TD>
                        <TD width=3></TD>
                        <TD width=26 height=19><A href="javascript:toggleTo(4)"><IMG id=A2_4 
                height=19 src="images/tu4_2.gif" width=26 border=0></A><A 
                href="javascript:toggleTo(4)"><IMG id=A1_4 style="DISPLAY: none" 
                height=19 src="images/tu4_1.gif" width=26 border=0></A></TD>
                        <TD width=82><%
      end if
      rst.close
      set rst=nothing
      %>
                        </TD>
                      </TR>
                    </TBODY>
                  </TABLE>
    TopImgToggle.js
    =================================================================================
    var NowImg = 1;
    var MaxImg = 4;
    var bStart = 0;
    var bStop =0;function fnToggle() {
    var next = NowImg + 1;if(next == MaxImg+1) 
    {
    NowImg = MaxImg;
    next = 1;
    }
    if(bStop!=1){if(bStart == 0)
    {
    bStart = 1;
    setTimeout('fnToggle()', 3000);
    return;
    }
    else
    {
    oTransContainer.filters[0].Apply();document.images['oDIV'+next].style.display = "";
    document.images['oDIV'+NowImg].style.display = "none"; oTransContainer.filters[0].Play(duration=2);if(NowImg == MaxImg) 
    NowImg = 1;
    else
    NowImg++;
    }
    setTimeout('fnToggle()', 3000);
    }
    }fnToggle();function toggleTo(img){
    bStop=1;if(img==1){
    document.images['oDIV1'].style.display = "";
    document.images['oDIV2'].style.display = "none"; 
    document.images['oDIV3'].style.display = "none"; 
    document.images['oDIV4'].style.display = "none"; 
    document.images['A1_1'].style.display = ""; 
    document.images['A2_1'].style.display = "none"; 
    document.images['A1_2'].style.display = "none";
    document.images['A2_2'].style.display = "";
    document.images['A1_3'].style.display = "none";
    document.images['A2_3'].style.display = "";
    document.images['A1_4'].style.display = "none";
    document.images['A2_4'].style.display = "";}else if(img==2){
    document.images['oDIV2'].style.display = "";
    document.images['oDIV1'].style.display = "none"; 
    document.images['oDIV3'].style.display = "none"; 
    document.images['oDIV4'].style.display = "none"; 
    document.images['A1_1'].style.display = "none"; 
    document.images['A2_1'].style.display = ""; 
    document.images['A1_2'].style.display = "";
    document.images['A2_2'].style.display = "none";
    document.images['A1_3'].style.display = "none";
    document.images['A2_3'].style.display = "";
    document.images['A1_4'].style.display = "none";
    document.images['A2_4'].style.display = "";
    }else if(img==3){
    document.images['oDIV3'].style.display = "";
    document.images['oDIV1'].style.display = "none"; 
    document.images['oDIV2'].style.display = "none"; 
    document.images['oDIV4'].style.display = "none"; 
    document.images['A1_1'].style.display = "none"; 
    document.images['A2_1'].style.display = ""; 
    document.images['A1_2'].style.display = "none";
    document.images['A2_2'].style.display = "";
    document.images['A1_3'].style.display = "";
    document.images['A2_3'].style.display = "none";
    document.images['A1_4'].style.display = "none";
    document.images['A2_4'].style.display = "";
    }else if(img==4){
    document.images['oDIV4'].style.display = "";
    document.images['oDIV1'].style.display = "none"; 
    document.images['oDIV2'].style.display = "none"; 
    document.images['oDIV3'].style.display = "none"; 
    document.images['A1_1'].style.display = "none"; 
    document.images['A2_1'].style.display = ""; 
    document.images['A1_2'].style.display = "none";
    document.images['A2_2'].style.display = "";
    document.images['A1_3'].style.display = "none";
    document.images['A2_3'].style.display = "";
    document.images['A1_4'].style.display = "";
    document.images['A2_4'].style.display = "none";
    }}
      

  5.   

    欢迎光监点石成金网 http://www.boxigroup.com 网站提供web开发(j2ee .net asp php javascript、c#等) c/s开发(delphi、vb、vc、pb、cb等) 数据库开发(oracle、sqlserver、db2、access、mysql、Postgresql、informix)等学习资料,希望能为你解决燃眉之急 ,请把本网站加入收藏夹,以备不时查询之需 bs+cs讨论群(9638134)