国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > JS > 正文

layui實現(xiàn)三級導航菜單

2024-05-06 16:53:37
字體:
供稿:網(wǎng)友

本文實例為大家分享了layui實現(xiàn)三級導航菜單的具體代碼,供大家參考,具體內(nèi)容如下

<!DOCTYPE html><html><head>  <meta charset="utf-8">  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">  <title>.Net海</title>  <link href="~/layui-v2.2.5/layui-v2.2.5/layui/css/layui.css" rel="external nofollow" rel="stylesheet" />  //注意路勁   <style>    ol li a {      background-color: rgba(0,0,0,1) !important;    }    .three_this {      background-color: #808080 !important;    }  </style></head><body class="layui-layout-body">  <div class="layui-layout layui-layout-admin">    <div class="layui-header">      <div class="layui-logo">layui 后臺布局</div>      <ul class="layui-nav layui-layout-left">        <li class="layui-nav-item"><a href="">控制臺</a></li>        <li class="layui-nav-item"><a href="">商品管理</a></li>        <li class="layui-nav-item"><a href="">用戶管理</a></li>        <li class="layui-nav-item">          <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >日常</a>          <dl class="layui-nav-child">            <dd><a href="">郵件管理</a></dd>            <dd><a href="">消息管理</a></dd>            <dd><a href="">授權(quán)管理</a></dd>          </dl>        </li>      </ul>      <ul class="layui-nav layui-layout-right">        <li class="layui-nav-item">          <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >            <img src="~/images/tb.png" class="layui-nav-img" />            .Net海          </a>          <dl class="layui-nav-child">            <dd><a href="">基本資料</a></dd>            <dd><a href="">安全設(shè)置</a></dd>          </dl>        </li>        <li class="layui-nav-item"><a href="">退出</a></li>      </ul>    </div>    <div class="layui-side layui-bg-black">      <div class="layui-side-scroll">        <ul class="layui-nav layui-nav-tree" lay-filter="test">          <li class="layui-nav-item layui-nav-itemed">            <a class="" href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >所有商品</a>            <dl class="layui-nav-child">              <dd>                <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="menu_three ">列表一</a>                <ol class="layui-nav-child" style="display: none;">                  <li><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三級列表一</a></li>                  <li><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三級列表二</a></li>                  <li><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三級列表三</a></li>                  <li><a href="">超鏈接</a></li>                </ol>              </dd>              <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="menu_three">列表二</a>                <ol class="layui-nav-child" style="display: none;">                  <li><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三級列表一</a></li>                  <li><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三級列表二</a></li>                  <li><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >三級列表三</a></li>                  <li><a href="">超鏈接</a></li>                </ol>              </dd>              <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >列表三</a></dd>              <dd><a href="">超鏈接</a></dd>            </dl>          </li>          <li class="layui-nav-item"><a href="">云市場</a></li>          <li class="layui-nav-item"><a href="">發(fā)布商品</a></li>        </ul>      </div>    </div>    <div class="layui-body">      <!-- 內(nèi)容主體區(qū)域 -->      <div style="padding: 15px;">內(nèi)容主體區(qū)域</div>    </div>    <div class="layui-footer">      <!-- 底部固定區(qū)域 -->      © layui.com - 底部固定區(qū)域    </div>  </div> //注意路勁  <script src="~/layui-v2.2.5/layui-v2.2.5/layui/layui.js"></script>  <script>    //JavaScript代碼區(qū)域    layui.use(['element', 'jquery'], function () {      var element = layui.element, $ = layui.jquery;      $(".menu_three").on("click", function () {                $(this).next().toggle();        $.each($(this).parent().siblings(), function (i, e) {          $(e).find("ol").hide();;        });              })      $("ol").on("click", "li a", function () {        $.each($(this).parent().siblings(), function (i, e) {          $(e).find("a").removeClass('three_this')        });        $(this).addClass('three_this'); // 添加當前元素的樣式      })    });  </script></body></html>

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持VeVb武林網(wǎng)。


注:相關(guān)教程知識閱讀請移步到JavaScript/Ajax教程頻道。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 确山县| 日照市| 习水县| 新昌县| 镇远县| 绵竹市| 万源市| 平昌县| 清水河县| 平阴县| 蒙山县| 宣威市| 清丰县| 横峰县| 台州市| 肇东市| 苍南县| 秦皇岛市| 乌鲁木齐市| 锦州市| 台东县| 和平县| 建湖县| 包头市| 夹江县| 嘉义县| 神池县| 永丰县| 扎囊县| 婺源县| 北票市| 分宜县| 普陀区| 奉贤区| 台江县| 崇文区| 衡阳县| 腾冲县| 茂名市| 盈江县| 同仁县|