- 首页
- 在线词典
- 在线翻译
- 网站翻译
- 翻译平台
- 成功案例
- 选择工具
- 翻译技巧
- 在线求助
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');
}
}
页: [1]