| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2061 人关注过本帖
标题:求助:在同一页面有两个滚动效果,冲突出在那里?
取消只看楼主 加入收藏
whfweb
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2015-3-25
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:2 
求助:在同一页面有两个滚动效果,冲突出在那里?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>不间断滚动</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<base href="http://www.

<BODY>


<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width=700 border=0>
  <TBODY>
  <TR>
    <TD>
      <DIV id=demo style="OVERFLOW: hidden; WIDTH: 700px; COLOR: #ffffff; HEIGHT: 120px">
      <TABLE cellPadding=0 align=left border=0 cellspace="0">
        <TBODY>
        <TR>
          <TD id=demo1 vAlign=top>
            <TABLE cellSpacing=0 cellPadding=0 border=0>
              <TBODY>
              <TR>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/1.jpg" width=150></A><BR>
                  <CENTER><B>说明一</B></CENTER></TD>
                <TD width=30></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/2.jpg" width=150></A><BR>
                  <CENTER><B>说明二</B></CENTER></TD></TD>
                <TD width=30></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/3.jpg" width=150></A><BR>
                  <CENTER><B>说明三</B></CENTER></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/4.jpg" width=150></A><BR>
                  <CENTER><B>说明四</B></CENTER></TD>
                <TD width=30></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/5.jpg" width=150></A><BR>
                  <CENTER><B>说明五</B></CENTER></TD></TR></TBODY></TABLE></TD>
          <TD id=demo2 vAlign=top></TD></TR></TBODY></TABLE></DIV>

<SCRIPT>
var speed=10//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
  if(demo2.offsetWidth-demo.scrollLeft<=0)
  demo.scrollLeft-=demo1.offsetWidth
  else{
  demo.scrollLeft++
  }
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>


</TD></TR></TBODY></TABLE></CENTER>



<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width=700 border=0>
  <TBODY>
  <TR>
    <TD>
      <DIV id=dom1 style="OVERFLOW: hidden; WIDTH: 700px; COLOR: #ffffff; HEIGHT: 120px">
      <TABLE cellPadding=0 align=left border=0 cellspace="0">
        <TBODY>
        <TR>
          <TD id=dom11 vAlign=top>
            <TABLE cellSpacing=0 cellPadding=0 border=0>
              <TBODY>
              <TR>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/1.jpg" width=150></A><BR>
                  <CENTER><B>说明一</B></CENTER></TD>
                <TD width=30></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/2.jpg" width=150></A><BR>
                  <CENTER><B>说明二</B></CENTER></TD></TD>
                <TD width=30></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/3.jpg" width=150></A><BR>
                  <CENTER><B>说明三</B></CENTER></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/4.jpg" width=150></A><BR>
                  <CENTER><B>说明四</B></CENTER></TD>
                <TD width=30></TD>
                <TD><A href="#" target=_blank><IMG class=b5 height=100 hspace=22 src="jsimg/5.jpg" width=150></A><BR>
                  <CENTER><B>说明五</B></CENTER></TD></TR></TBODY></TABLE></TD>
          <TD id=dom12 vAlign=top></TD></TR></TBODY></TABLE></DIV>

<SCRIPT>
var speed=10//速度数值越大速度越慢
dom12.innerHTML=dom11.innerHTML
function Marquee(){
  if(dom12.offsetWidth-dom1.scrollLeft<=0)
  dom1.scrollLeft-=dom11.offsetWidth
  else{
  dom1.scrollLeft++
  }
}
var MyMar=setInterval(Marquee,speed)
dom1.onmouseover=function() {clearInterval(MyMar)}
dom1.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>


</TD></TR></TBODY></TABLE></CENTER>


</BODY></HTML>
搜索更多相关主题的帖子: content PUBLIC ffffff border hidden 
2015-03-25 20:03
whfweb
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2015-3-25
收藏
得分:0 
回复 2楼 冰镇柠檬汁儿
代码是有差别的,问题是一个鼠标指上去能停,一个不能停.
2015-03-25 21:37
whfweb
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2015-3-25
收藏
得分:0 
回复 4楼 冰镇柠檬汁儿
搞好了,谢谢兄弟~
2015-03-26 11:39
快速回复:求助:在同一页面有两个滚动效果,冲突出在那里?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018108 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved