最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

修改layui的后臺(tái)模板的左側(cè)導(dǎo)航欄可以伸縮的方法

 更新時(shí)間:2019年09月10日 16:12:10   作者:小龍魂  
今天小編就為大家分享一篇修改layui的后臺(tái)模板的左側(cè)導(dǎo)航欄可以伸縮的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧

原生的左側(cè)導(dǎo)航欄代碼:

<div class="layui-side layui-bg-black">
  <div class="layui-side-scroll">
   <!-- 左側(cè)導(dǎo)航區(qū)域(可配合layui已有的垂直導(dǎo)航) -->
   <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" 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" 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="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" 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="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" 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="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" 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" 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="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" 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="">云市場(chǎng)</a></li>
    <li class="layui-nav-item"><a href="">發(fā)布商品</a></li>
   </ul>
  </div>
 </div>


自己修改的:

<div class="layui-side layui-bg-black">
  <div class="layui-side-scroll">
    <div title="菜單縮放" class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
    <!-- 左側(cè)導(dǎo)航區(qū)域(可配合layui已有的垂直導(dǎo)航) -->
    <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" 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" ><i class="fa fa-user-circle-o fa-lg"></i> <span >生源追蹤</span></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" 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" ><i class="fa fa-list fa-lg"></i> <span >生源列表</span></a></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" 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" ><i class="fa fa-clipboard fa-lg"></i> <span >學(xué)校信息</span></a></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" 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" ><i class="fa fa-file-text fa-lg"></i> <span >工做計(jì)劃</span></a></dd>
        </dl>
      </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" 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" ><i class="fa fa-vcard fa-lg"></i> <span >學(xué)員管理</span></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" 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" ><i class="fa fa-th-list fa-lg"></i> <span >學(xué)員列表</span></a></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" 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" ><i class="fa fa-user-o fa-lg"></i> <span >考勤管理</span></a></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" 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" ><i class="fa fa-send-o fa-lg"></i> <span >溝通計(jì)劃</span></a></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" 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" ><i class="fa fa-frown-o fa-lg"></i> <span >成績(jī)管理</span></a></dd>
        </dl>
      </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" 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" ><i class="fa fa-diamond fa-lg"></i> <span >管理設(shè)置</span></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" 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" ><i class="fa fa-address-book fa-lg"></i> <span >賬號(hào)管理</span></a></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" 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" ><i class="fa fa-check-square fa-lg"></i> <span >授權(quán)管理</span></a></dd>
        </dl>
      </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" 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" ><i class="fa fa-gear fa-lg"></i> <span >系統(tǒng)管理</span></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" 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" ><i class="fa fa-window-restore fa-lg"></i> <span >系統(tǒng)信息</span></a></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" 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" ><i class="fa fa-database fa-lg"></i> <span >操作日志</span></a></dd>
        </dl>
      </li>
    </ul>
  </div>
</div>

JQ代碼:

<script>
  //JavaScript代碼區(qū)域
  layui.use('element', function(){
    var element = layui.element;

  });
  var isShow = true; //定義一個(gè)標(biāo)志位
  $('.kit-side-fold').click(function(){
    //選擇出所有的span,并判斷是不是hidden
    $('.layui-nav-item span').each(function(){
      if($(this).is(':hidden')){
        $(this).show();
      }else{
        $(this).hide();
      }
    });
    //判斷isshow的狀態(tài)
    if(isShow){
      $('.layui-side.layui-bg-black').width(60); //設(shè)置寬度
      $('.kit-side-fold i').css('margin-right', '70%'); //修改圖標(biāo)的位置
      //將footer和body的寬度修改
      $('.layui-body').css('left', 60+'px');
      $('.layui-footer').css('left', 60+'px');
      //將二級(jí)導(dǎo)航欄隱藏
      $('dd span').each(function(){
        $(this).hide();
      });
      //修改標(biāo)志位
      isShow =false;
    }else{
      $('.layui-side.layui-bg-black').width(200);
      $('.kit-side-fold i').css('margin-right', '10%');
      $('.layui-body').css('left', 200+'px');
      $('.layui-footer').css('left', 200+'px');
      $('dd span').each(function(){
        $(this).show();
      });
      isShow =true;
    }
  });

</script>

以上這篇修改layui的后臺(tái)模板的左側(cè)導(dǎo)航欄可以伸縮的方法就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • javascript 彈出層組件(升級(jí)版)

    javascript 彈出層組件(升級(jí)版)

    前面文章里寫過(guò)一個(gè)彈出層對(duì)話框,但ie6下有bug,根本沒(méi)有實(shí)現(xiàn)position:fixed的效果,當(dāng)時(shí)沒(méi)有真實(shí)ie6環(huán)境,測(cè)試疏忽,匆匆放到博客上,還讓一些讀者看到甚至使用,在這里表示萬(wàn)分抱歉啊
    2011-05-05
  • 微信小程序修改checkbox的樣式代碼實(shí)例

    微信小程序修改checkbox的樣式代碼實(shí)例

    這篇文章主要介紹了微信小程序修改checkbox的樣式代碼實(shí)例,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-01-01
  • JavaScript的高級(jí)概念和用法詳解

    JavaScript的高級(jí)概念和用法詳解

    JavaScript語(yǔ)言不斷發(fā)布一些新特性,感覺(jué)要上天的節(jié)奏啊。本文搜集整理了一些它的高級(jí)概念和用法,需要的朋友可以參考下
    2022-07-07
  • 快速解決bootstrap下拉菜單無(wú)法隱藏的問(wèn)題

    快速解決bootstrap下拉菜單無(wú)法隱藏的問(wèn)題

    今天小編就為大家分享一篇快速解決bootstrap下拉菜單無(wú)法隱藏的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2018-08-08
  • JavaScript實(shí)踐之使用Canvas開(kāi)發(fā)一個(gè)可配置的大轉(zhuǎn)盤抽獎(jiǎng)功能

    JavaScript實(shí)踐之使用Canvas開(kāi)發(fā)一個(gè)可配置的大轉(zhuǎn)盤抽獎(jiǎng)功能

    公司項(xiàng)目搞優(yōu)惠活動(dòng),讓做一個(gè)轉(zhuǎn)盤抽獎(jiǎng)的活動(dòng),這篇文章主要給大家介紹了關(guān)于JavaScript實(shí)踐之使用Canvas開(kāi)發(fā)一個(gè)可配置的大轉(zhuǎn)盤抽獎(jiǎng)功能的相關(guān)資料,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2023-11-11
  • url 特殊字符 傳遞參數(shù)解決方法

    url 特殊字符 傳遞參數(shù)解決方法

    有些符號(hào)在URL中是不能直接傳遞的,如果要在URL中傳遞這些特殊符號(hào),那么就要使用他們的編碼了。下表中列出了一些URL特殊符號(hào)及編碼。
    2010-01-01
  • javascript中拼接HTML字符串的最快、最好的方法

    javascript中拼接HTML字符串的最快、最好的方法

    這篇文章主要介紹了javascript中拼接HTML字符串的最快、最好的方法,本文共計(jì)介紹了3種方法,并對(duì)3個(gè)各自做了瀏覽器速度測(cè)試,需要的朋友可以參考下
    2014-06-06
  • JS實(shí)現(xiàn)獲取圖片大小和預(yù)覽的方法完整實(shí)例【兼容IE和其它瀏覽器】

    JS實(shí)現(xiàn)獲取圖片大小和預(yù)覽的方法完整實(shí)例【兼容IE和其它瀏覽器】

    這篇文章主要介紹了JS實(shí)現(xiàn)獲取圖片大小和預(yù)覽的方法,結(jié)合完整實(shí)例形式分析了javascript針對(duì)不同瀏覽器處理圖片上傳與預(yù)覽等操作的相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下
    2017-04-04
  • JS獲取幾種URL地址的方法小結(jié)

    JS獲取幾種URL地址的方法小結(jié)

    本篇文章主要是對(duì)JS獲取幾種URL地址的方法進(jìn)行了總結(jié)介紹,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助
    2014-02-02
  • 微信小程序?qū)崿F(xiàn)購(gòu)物車功能

    微信小程序?qū)崿F(xiàn)購(gòu)物車功能

    這篇文章主要為大家詳細(xì)介紹了微信小程序?qū)崿F(xiàn)購(gòu)物車功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-11-11

最新評(píng)論

唐山市| 海原县| 沅江市| 吴忠市| 通江县| 曲阜市| 富阳市| 廉江市| 抚远县| 平度市| 泽库县| 内丘县| 临朐县| 丹寨县| 泽州县| 衡阳县| 阿合奇县| 华蓥市| 香港 | 丰镇市| 公主岭市| 萨嘎县| 新宾| 海兴县| 阿城市| 连南| 黎城县| 武夷山市| 六枝特区| 江城| 都安| 内黄县| 湖南省| 正宁县| 鲜城| 深水埗区| 丰都县| 焦作市| 格尔木市| 邓州市| 建始县|