手机版 | 登陆 | 注册 | 投稿 | 反馈留言 | 设首页 | 加收藏
网站首页 > 素材 > 特效 > 特效技巧 >横向6级展开菜单_菜单导航特效

横向6级展开菜单_菜单导航特效

时间:2018-01-20    点击: 次    发布者:佚名 - 小 + 大

6级菜单



代码如下:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" mrc="text/html; charset=UTF-8" />
<title>6级菜单</title>
<style>
#nav, 
#nav ul {padding:0 0 5px 0; margin:0; list-style:none; font: 10px verdana, sans-serif; border:1px solid #000; border-color:#eca #b97 #a86 #edb; border-width:1px 2px 2px 1px; background:#fff; position:relative; z-index:200;}
#nav {height:25px; padding:0;}
#nav li {float:left;}
#nav li li {float:none; background:#fff;}
* html #nav li li {float:left;}
#nav li a {display:block; float:left; color:#888; margin:0 25px 0 10px; height:25px; line-height:25px; text-decoration:none; white-space:nowrap;}
#nav li li a {height:20px; line-height:20px; float:none;}
#nav li:hover {position:relative; z-index:300;}
#nav li:hover ul {left:0; top:22px;}
* html #nav li:hover ul {left:10px;}
#nav ul {position:absolute; left:-9999px; top:-9999px;}
* html #nav ul {width:1px;} /* www.mb5u.com */
#nav li:hover li:hover > ul {left:-15px; margin-left:100%; top:-1px;}
#nav li:hover > ul ul {position:absolute; left:-9999px; top:-9999px; width:auto;}
#nav li:hover > a {text-decoration:underline; color:#b75;}
#nav li:hover li:hover ul,
#nav li:hover li:hover li:hover ul,
#nav li:hover li:hover li:hover li:hover ul,
#nav li:hover li:hover li:hover li:hover li:hover ul
{left:-15px; margin-left:100%; top:-1px;}
#nav li:hover ul ul,
#nav li:hover li:hover ul ul,
#nav li:hover li:hover li:hover ul ul,
#nav li:hover li:hover li:hover li:hover ul ul
{position:absolute; left:-9999px; top:-9999px;}
#nav li:hover a,
#nav li:hover li:hover a,
#nav li:hover li:hover li:hover a,
#nav li:hover li:hover li:hover li:hover a,
#nav li:hover li:hover li:hover li:hover li:hover a,
#nav li:hover li:hover li:hover li:hover li:hover li:hover a
{text-decoration:underline; color:#b75;}
#nav li:hover li a,
#nav li:hover li:hover li a,
#nav li:hover li:hover li:hover li a,
#nav li:hover li:hover li:hover li:hover li a,
#nav li:hover li:hover li:hover li:hover li:hover li a
{text-decoration:none; color:#888;}
</style>
<script type="text/javascript">
stuHover = function() {
var cssRule;
var newSelector;
for (var i = 0; i < document.styleSheets.length; i++)
for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
{
cssRule = document.styleSheets[i].rules[x];
if (cssRule.selectorText.indexOf("LI:hover") != -1)
{
newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
}
}
var getElm = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<getElm.length; i++) {
getElm[i].onmouseover=function() {
this.className+=" iehover";
}
getElm[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" iehover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);
</script>
</head>
<body>
<ul id="nav">
<li><a href="#nogo">Home</a></li>
<li><a href="#nogo">About us &raquo;</a>
<ul>
<li><a href="#nogo">Who we are</a></li>
<li><a href="#nogo">What we do</a></li>
</ul>
</li>
<li><a href="#nogo">Products &raquo;</a>
<ul>
<li><a href="#nogo">Tripods &raquo;</a>
<ul>
<li><a href="#nogo">Monopods</a></li>
<li><a href="#nogo">Tripods</a></li>

</ul>
</li>
<li><a href="#nogo">Films &raquo;</a>
<ul>
<li><a href="#nogo">35mm</a></li>
<li><a href="#nogo">Roll</a></li>
</ul>
</li>
<li><a href="#nogo">Cameras &raquo;</a>
<ul>
<li><a href="#nogo">Compact &raquo;</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon</a></li>
</ul>
</li>
<li><a href="#nogo">Digital &raquo;</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon &raquo;</a>
<ul>
<li><a href="#nogo">Lenses &raquo;</a>
<ul>
<li><a href="#nogo">Standard</a></li>
<li><a href="#nogo">Mirror</a></li>
<li><a href="#nogo">Macro</a></li>
</ul>
</li>
<li><a href="#nogo">Speedlight</a></li>
<li><a href="#nogo">Coolpix &raquo;</a>
<ul>
<li><a href="#nogo">Coolpix S10</a></li>
<li><a href="#nogo">Coolpix L2</a></li>
<li><a href="#nogo">Coolpix 4600</a></li>
</ul>
</li>
<li><a href="#nogo">D200</a></li>
<li><a href="#nogo">D80</a></li>
</ul>
</li>
<li><a href="#nogo">Minolta</a></li>
<li><a href="#nogo">Pentax</a></li>
</ul>
</li>
<li><a href="#nogo">SLR &raquo;</a>
<ul>
<li><a href="#nogo">Canon</a></li>
<li><a href="#nogo">Nikon</a></li>
<li><a href="#nogo">Minolta</a></li>
</ul>
</li>
</ul>
 </li>
<li><a href="#nogo">Flash</a></li>
<li><a href="#nogo">Video</a></li>
</ul>
  </li>
<li><a href="#nogo">FAQs &raquo;</a>
<ul>
<li><a href="#nogo">Cameras</a></li>
<li><a href="#nogo">Film types</a></li>
</ul>
</li>
<li><a href="#nogo">Privacy &raquo;</a>
<ul>
<li><a href="#nogo">Privacy Policy</a></li>
<li><a href="#nogo">Privacy Statement</a></li>
</ul>
</li>
<li><a href="#nogo">Contact us</a></li>
</ul>
</body>
</html>


上一篇:JS+CSS仿流行的LED跑马屏效果

下一篇:CSS实现折叠的菜单_菜单导航特效



Copyright © 2019 天人系列管理系统 版权所有,授权www.rjc.wang使用  Powered by 55TR.COM 运行代码测试页
锐教程网站www.rjc.wang由天天科技荣誉出品