| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1107 人关注过本帖
标题:chinaz中国站长网的导航条效果遇到的问题,麻烦高手帮忙解决一下
只看楼主 加入收藏
heavenchueng
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-10-22
收藏
 问题点数:0 回复次数:0 
chinaz中国站长网的导航条效果遇到的问题,麻烦高手帮忙解决一下
本人找了一个中国站长网的导航条
可是他的页面头用的是
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

而我的页面用的都是
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

如果改成跟他页面一样我的大部分页面就不能用了
就是下拉菜单不能显示出来
麻烦哪位高手帮我改成
好像是由于js文件导致的
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
能用的  多谢了 多谢了


代码如下
nav.html

<!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>
<link rel="stylesheet" type="text/css" href="css/nav.css"/>
<script src="css/nav.js" type="text/javascript"></script>
</head>
<body>
<div class="cztopbg">
<div class="container">
<div class="nav">
  <div class="navinner">
    <ul class="navlist">
      <li><a href="#">首页</a></li>
      <li><a href="#" id="nav_1" onmouseover="showMenu('nav_1','subnav1')">在线词典</a></li>
      <li><a href="#" id="nav_2" onmouseover="showMenu('nav_2','subnav2')">在线翻译</a></li>
      <li><a href="#" id="nav_3" onmouseover="showMenu('nav_3','subnav3')">网站翻译</a></li>
      <li><a href="#" id="nav_4" onmouseover="showMenu('nav_5','subnav5')">翻译平台</a>
            <div class="subnav disable" id="subnav5">
            <p class="pointer">.</p>
            <p><span> <a href="#">网页翻译</a> | <a href="#">文本翻译</a></span></p>
          </div>
      </li>
      <li><a href="#" id="nav_5" onmouseover="showMenu('nav_4','subnav4')">成功案例</a></li>
      <li><a href="#" id="nav_6" onmouseover="showMenu('nav_6','subnav6')">选择工具</a></li>
      <li><a href="#" id="nav_7" onmouseover="showMenu('nav_7','subnav7')">翻译技巧</a></li>
      <li><a href="#" id="nav_8" onmouseover="showMenu('nav_7','subnav7')">在线求助</a></li>
    </ul>
  </div>
</div>
</body>
</html>


nav.css
.container {
    width: 810px;
    min-height: 100%;
    margin: auto;
    text-align: left;
    background: #fff;
}
.nav a:link, a:visited {
    color: #333;
    text-decoration: none;
}


/* Nav
==========================================================*/
.nav {
    font: 12px/1.5 Tahoma, Helvetica, Arial, sans-serif;
    position: relative;
    margin: 0 10px 10px;
    background: url(../images/../images/nav_bg.png) no-repeat 0 -36px;
}
.navinner {
    background: url(../images/nav_bg.png) no-repeat 100% -72px;
}
.navlist {
    height: 36px;
    line-height: 36px;
    overflow: hidden;
    margin: 0 10px;
    background: url(../images/nav_bg.png) repeat-x 0 0;
}
.nav li {
    float: left;
    display: inline;
    margin: 0 0 0 -2px;
    padding: 0 4px 0 6px;
    background: url(../images/nav_bg.png) no-repeat 0 -108px;
}
.nav a {
    display: block;
    width: 76px;
    text-align: center;
    font-size: 120%;
}
.nav a:link, .nav a:visited {
    color: #fff;
}
.nav a.current, .nav a:hover, .nav a:active {
    color: #fff;
    font-weight: bold;
    background: url(../images/nav_bg.png) no-repeat 50% -144px;
}
.subnav {
    position: absolute;
    top: 41px;
    left: 0;
    float: left;
    height: 27px;
    line-height: 27px;
    white-space: nowrap;
    background: url(../images/nav_bg.png) no-repeat 0 -180px;
}
* html .subnav {
    margin: 0 10px 0 -10px; /* IE 6 and below */
}
.subnav p {
    padding: 0 10px;
    background: url(../images/nav_bg.png) no-repeat 100% -234px;
}
.subnav p span {
    display: block;
    background: url(../images/nav_bg.png) repeat-x 0 -207px;
}
.subnav p.pointer {
    position: absolute;
    top: -4px;
    left: 0;
    height: 5px;
    width: 11px;
    padding: 0;
    margin-left: 20px;
    text-indent: -999em;
    background: url(../images/nav_bg.png) repeat-x 0 -261px;
}
.subnav a {
    display: inline;
    padding: 0;
    font-size: 100%;
}
[class~="subnav"] a {
    padding: 0 3px;
}
.subnav, .subnav a:link, .subnav a:visited {
    color: #235e99;
}
.subnav a:hover, .subnav a:active {
    color: #235e99;
}
.subnav a:hover, .subnav a:active {
    font-weight: normal;
    background: none;
    border-bottom: 2px solid;
}
/* subnav position and pointer position */
#subnav5 { left:340px;}
#subnav5 .pointer { left: 20px;; right: 290px; }
#subnav5 { min-width: 340px; }


/* Note
==========================================================*/
.note {
    margin: 0 15px 10px;
    color:#666666;
}
.note span{
    float:right;
}
.disable {
    display: none;
}


nav.js


function $(id) {
    return document.getElementById(id);
}
function showMenu (baseID, divID) {
    baseID = $(baseID);
    divID  = $(divID);

    //var l = GetOffsetLeft(baseID);
    //var t = GetOffsetTop(baseID);

    //divID.style.left = l + 'px';
//    divID.style.top = t + baseID.offsetHeight + 'px';
    if (showMenu.timer) clearTimeout(showMenu.timer);
    hideCur();
    divID.style.display = 'block';
    showMenu.cur = divID;

    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
            hideCur();
            divID.style.display = 'block';
        };

        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
        }

        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
    function hideCur () {
        showMenu.cur && (showMenu.cur.style.display = 'none');
    }
}
搜索更多相关主题的帖子: 导航条 中国 chinaz 站长 效果 
2008-10-22 20:49
快速回复:chinaz中国站长网的导航条效果遇到的问题,麻烦高手帮忙解决一下
数据加载中...
 
   



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

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