| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1298 人关注过本帖
标题:想实现随网页滚动的效果,可是不动,帮忙看看
取消只看楼主 加入收藏
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
结帖率:86.96%
收藏
已结贴  问题点数:15 回复次数:6 
想实现随网页滚动的效果,可是不动,帮忙看看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>{$title}</title>
<meta name="generator" content="{$generator}" />
<meta name="Keywords" content="{$keywords}" />
<</head>
<body>
<div class="all" >
  <div class="top">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="19%"><span class="banner">{$showlogo(channelid,130,150)}</span></td>
          <td width="81%" align="center"><span class="banner">{$showbanner(channelid,670,150)}</span></td>
        </tr>
      </table>
      
      
  </div>
  <div class="mid" style="background-image:{$csspicurl}backgrand.gif">
      <table width="100%" height="55"  border="0" cellpadding="0" cellspacing="0" class="hj1" >
        <tr>
          <td height="40" style="background-color:#ffa631" valign="right"  valign="bottom"><span class="wm"> <a href="{$webdir}Photo/Index.asp">学校相册</a> </span><span class="wm">  <a href="{$webdir}GuestBook/Index.asp">留言平台</a>   </span>
</td>         
        </tr>
        <tr><td height="15">&nbsp;</td></tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="120" valign="top" class="bj">
          <div id=lovexin1  style='Z-INDEX: 10; POSITION: absolute; '>
          <table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
              <tr>
                <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="3%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
                          <td width="97%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt2">
                            <tr>
                              
                              <td width="75" align="left"><div >发布量情况</div></td>
                            </tr>
                          </table></td>
                        </tr>
                    </table></td>
              </tr>
              <tr>
                <td class="cdbk" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td bgcolor="#ffc773" class="lrlb">
                              <div class="wz2">
                                 {$channelcount(channelid)}
                              </div>
                      </td>
                    </tr>
                </table></td>
              </tr>
            </table></div>
          </td>
     <td width="15">&nbsp;</td>   
          <td width="560" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
                <tr>
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="1%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
                        <td width="99%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt3">
                            <tr>
                              
                              <td width="520" height="22" align="left"><div class="btkz"> <a href="{$webdir}Star/ShowClass.asp?ClassID=19">本校之星</a></div></td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td bgcolor="#fffbf0" class="lrlb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="36%" bgcolor="#fffbf0">
                             <div class="wz1">
<!--{$Showpicarticle(26,0,0,9,20,1,3,100,115,10,false,False)}-->
                              </div>
                              </td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
                <tr>
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="1%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
                        <td width="99%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt3">
                            <tr>
                             
                              <td width="520" height="22" align="left"><div class="btkz"> <a href="{$webdir}Article/ShowHot.asp">最新文章</a></div></td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td bgcolor="#fffbf0" class="lrlb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="36%" bgcolor="#fffbf0">
                             
                              <div class="wz1">
                                  <!--{$ShowTopArticle(26,0,0,8,32,2,true,true,false)}-->                              </div>
                              </td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
                <tr>
                  <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="1%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
                        <td width="99%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt3">
                            <tr>
                             
                              <td width="520" height="22" align="left"><div class="btkz"> 班级直通车</div></td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td bgcolor="#fffbf0" class="lrlb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="36%" bgcolor="#fffbf0">
                             
                                                            </td>
                            </tr>
                        </table></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
            </td>
            <td width="15">&nbsp;</td>
            <td width="120" valign="top" class="bj">
            <div id=lovexin2  style='Z-INDEX: 10; POSITION: absolute; '>
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
                  <tr>
                    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="3%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
                          <td width="97%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt2">
                            <tr>
                              
                              <td width="75" align="left"><div >访问量情况</div></td>
                            </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td bgcolor="#ffc773" class="lrlb">
                          <div class="wz2">
                        <script type="text/javascript" src="{$webdir}Count.asp?style=product"></script>  </div>
                          </td>
                        </tr>
                    </table></td>
                  </tr>
              </table></div>
</td>
        </tr>
      </table>
      
  </div>
  <table width="100%"height="85"> <tr><td >&nbsp;</td></tr></table>
<div class="butten" style="background-color: #e7e3a6;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" >
      <tr>
        <td width="1%">&nbsp;</td>
        <td width="98%" align="center" ><span class="wm">|  <a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(' ');" href="#">设为首页</a> | <a target="_top" href="javascript:window.external.AddFavorite(' ','创力网站管理系统')">加入收藏</a> | <a href="{$webdir}user/login.asp">用户登陆</a> |  <a href="{$webdir}Help.asp?Action=contact">联系我们</a> | </span></td>
        <td width="1%">&nbsp;</td>
      </tr>
    </table>
  <div class="bq">
{$runtime}<br>
{$copyright}</div>
  </div>
</div>
<SCRIPT LANGUAGE="JavaScript">

lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.3*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin1.style.pixelTop+=percent;
document.all.lovexin2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide()  
{   
lovexin1.style.visibility="hidden";
lovexin2.style.visibility="hidden";
}
window.setInterval("heartBeat()",1);
</SCRIPT>
</body>
</html>
红色的代码是实现两联随网页滚动的代码,可是为什么不行呢?


[ 本帖最后由 yushan_0008 于 2009-9-17 16:35 编辑 ]
搜索更多相关主题的帖子: 滚动 效果 网页 
2009-09-17 16:33
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
收藏
得分:0 
帮帮忙呗~~
2009-09-18 14:17
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
收藏
得分:0 
网站首页是这样的~
图片附件: 游客没有浏览图片的权限,请 登录注册
2009-09-18 15:27
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
收藏
得分:0 
网站首页是这样的~
图片附件: 游客没有浏览图片的权限,请 登录注册
2009-09-18 15:27
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
收藏
得分:0 
网站首页是这样的~
图片附件: 游客没有浏览图片的权限,请 登录注册
2009-09-18 15:27
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
收藏
得分:0 
回复 7楼 yms123
不是,是让两边的那两块,随网页滚动。
2009-09-19 11:09
yushan_0008
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2009-6-16
收藏
得分:0 
我上面就是从百度找的,可是不行啊,所以才来这让大家帮忙看看代码的,如果是滚动图片什么的,我感觉应该没事,可是我那个是JS代码调用,这个妨碍吗?
2009-09-20 14:06
快速回复:想实现随网页滚动的效果,可是不动,帮忙看看
数据加载中...
 
   



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

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