jquery特效 二级导航菜单显示动画效果,完整例子

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> jquery特效 二级导航菜单显示动画效果 </title>
  <script src="http://www.jsjtt.com/skin/jsjtt/js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script  type="text/javascript">
$(document).ready(function(){  
  $('li.mainlevel').mousemove(function(){
  //段落滑下效果
  $(this).find('ul').slideDown();
  });
  $('li.mainlevel').mouseleave(function(){
  //段落滑上效果
  $(this).find('ul').stop(true,true).slideUp("fast");
  });  
});
</script>

 </head>

 <body>
  

<div id="menu">
<ul id="nav">

    <li class="jquery_out">
    <div class="jquery_inner">
    <div class="jquery">
    <span class="text">首页</span>
    </div>
    </div>
    </li>
    
    <li class="mainlevel" id="mainlevel_01"><a href="http://www.jsjtt.com/" target="_blank">计算机天堂</a>
    <ul id="sub_01">
    <li><a href="http://www.jsjtt.com/" target="_blank"></a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=6/" target="_blank">数据库</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=5/" target="_blank">WEB开发</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=4/" target="_blank">JAVA</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=3/" target="_blank">编程语言</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=2/" target="_blank">系统应用</a></li>
    </ul>
    </li>
    
    <li class="mainlevel" id="mainlevel_02"><a href="http://www.jsjtt.com/" target="_blank">Jquery资源</a>
    <ul id="sub_02">
    <li><a href="http://www.jsjtt.com/" target="_blank">计算机天堂</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=6/" target="_blank">数据库</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=5/" target="_blank">WEB开发</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=4/" target="_blank">JAVA</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=3/" target="_blank">编程语言</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=2/" target="_blank">系统应用</a></li>
    </ul>
    </li>
    
    <li class="mainlevel" id="mainlevel_03"><a href="http://www.jsjtt.com/" target="_blank">Jquery特效</a>
    <ul id="sub_03">
	<li><a href="http://www.jsjtt.com/" target="_blank">计算机天堂</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=6/" target="_blank">数据库</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=5/" target="_blank">WEB开发</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=4/" target="_blank">JAVA</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=3/" target="_blank">编程语言</a></li>
    <li><a href="http://www.jsjtt.com/e/action/ListInfo/?classid=2/" target="_blank">系统应用</a></li>
    </ul>
    </li>
    
    <div class="clear"></div>

</ul>
</div>

 </body>

 <style>
html, body, ul, li, h1, h2, h3, h4, h5, h6, fieldset, legend {padding:0; margin:0;}
body {font:12px/normal Verdana, Arial, Helvetica, sans-serif;}
ul,li {list-style-type:none; text-transform:capitalize;}
.clear {clear:both; *display:inline;/*IE only*/}

/*menu*/
#nav {margin:0 auto 60px; width:1080px; display:block;}
#nav .jquery_out {float:left;line-height:32px;display:block; border-right:1px solid #fff; text-align:center; color:#fff;font:18px/32px "微软雅黑";background-color: black; }
#nav .jquery_out .smile {padding-left:1em;}
#nav .jquery_inner {margin-left:16px;}
#nav .jquery {margin-right:1px;padding:0 2em;}
#nav .mainlevel {background:#C4C9CC; float:left; border-right:1px solid #fff; width:140px;/*IE6 only*/}
#nav .mainlevel a {color:#000; text-decoration:none; line-height:32px; display:block; padding:0 20px; width:100px; font-weight:bold;}
#nav .mainlevel a:hover {color:#fff; text-decoration:none; background:#062723 url(../images/slide-panel_03.png) 0 0 repeat-x; font-weight:bold;}
#nav .mainlevel ul {display:none; position:absolute;}
#nav .mainlevel li {border-top:1px solid #fff; background:#C4C9CC; width:140px;/*IE6 only*/ font-weight:bold;}
.log {text-align:center; color:skyblue; line-height:24px; text-transform:capitalize; margin:50px auto;}

</style>
</html>
来源://作者:/更新时间:2012-12-13
相关文章
评论:
验证码:
匿名评论: