欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js實(shí)現(xiàn)二級導(dǎo)航功能

 更新時間:2017年03月03日 14:15:24   作者:君邪兒  
本文主要介紹了js實(shí)現(xiàn)二級導(dǎo)航功能的實(shí)例,具有很好的參考價值。下面跟著小編一起來看下吧

效果圖:

代碼如下:

<!DOCTYPE html>
<html>
 <head>
 <meta charset="UTF-8">
 <title></title>
 <style type="text/css">
  a{text-decoration: none;}
  *{margin: 0;padding: 0;box-sizing: border-box;font-family: "微軟雅黑";}
  li{list-style-type: none;}
  .box{width: 220px;height: 477px;margin-top: 110px;margin-left: 100px;}
  h3{width: 100%;height: 50px;line-height: 50px;text-align: center;background: #09f;}
  h3 a{color: #FFFFFF;}
  h3 a:hover{color: deeppink;}
  ul li{width: 100%;height: 70px;line-height: 70px;border: 1px solid red;background: #09e;}
  ul li:not(:last-child){border-bottom: none;}
  ul li a{display: block;color:#FFFFFF;text-align: center;font-weight: bold;font-size: 18px;}
  ul li:hover{background: #00E8D7;}
  ul li:hover a{color: orange;}
  ul{position: relative;}
  .content{
  position: absolute;top:0;left: 220px;
  width: 800px;height: 300px;
  border: 1px solid #00FF66;
  display: none;
  }
 </style>
 </head>
 <body>
 <p style="margin: 20px;">
  end():結(jié)束當(dāng)前鏈條中最近的篩選操作,并將匹配元素還原為之前的匹配狀態(tài)。
 </p>
 <div class="box">
  <h3><a href="" target=" rel="external nofollow" _blank">全部菜單</a></h3>
  <ul>
  <li>
   <a href="">一級導(dǎo)航</a>
   <div class="content">
   11111111111111111111111111
   </div>
  </li>
  <li>
   <a href="">一級導(dǎo)航</a>
   <div class="content">
   22222222222222222222222222
   </div>
  </li>
  <li>
   <a href="">一級導(dǎo)航</a>
   <div class="content">
   33333333333333333333333333333
   </div>
  </li>
  <li>
   <a href="">一級導(dǎo)航</a>
   <div class="content">
   44444444444444444444
   </div>
  </li>
  <li>
   <a href="">一級導(dǎo)航</a>
   <div class="content">
   5555555555555555555555555555
   </div>
  </li>
  <li>
   <a href="">一級導(dǎo)航</a>
   <div class="content">
   6666666666666666666666666666666666
   </div>
  </li>
  </ul>
 </div>
 </body>
</html>
<script src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
 $(function(){
 $('ul li').hover(function(){
  $(this).find('.content').show().end().siblings().find('.content').hide();
 },function(){
  $(this).find('.content').hide();
 }); 
 })
</script>

以上就是本文的全部內(nèi)容,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作能帶來一定的幫助,同時也希望多多支持腳本之家!

相關(guān)文章

最新評論