關(guān)于layui導(dǎo)航欄不展示下拉列表的解決方法
更新時間:2019年09月25日 15:44:42 作者:aimashi@@@
今天小編就為大家分享一篇關(guān)于layui導(dǎo)航欄不展示下拉列表的解決方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
在使用導(dǎo)航欄時下拉列表不展示
沒有下拉效果是這樣的
經(jīng)過修改后就解決了:
具體原因是沒有導(dǎo)入:layui/layui.js
我的jsp代碼是這樣的:
<html> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="renderer" content="webkit|ie-comp|ie-stand"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <link rel="shortcut icon" href="/favicon.ico" rel="external nofollow" type="image/x-icon" /> <link rel="stylesheet" href="/ssm/static/css/font.css" rel="external nofollow" > <link rel="stylesheet" href="/ssm/static/css/xadmin.css" rel="external nofollow" > <link rel="stylesheet" href="/ssm/static/lib/layui/css/layui.css" rel="external nofollow" /> <script type="text/javascript" src="/ssm/jquery/jquery-1.4.4.min.js"></script> <script src="/ssm/static/lib/layui/layui.all.js" charset="utf-8"></script> <script src="/ssm/static/lib/layui/layui.js" charset="utf-8"></script> <script type="text/javascript" src="/ssm/static/js/xadmin.js"></script> <head> <title>Title</title> </head> <script> //注意:導(dǎo)航 依賴 element 模塊,否則無法進行功能性操作 layui.use('element', function(){ var element = layui.element; }); </script> <body> <ul class="layui-nav"> <li class="layui-nav-item"> <a href="">控制臺<span class=" rel="external nofollow" layui-badge">9</span></a> </li> <li class="layui-nav-item"> <a href="">個人中心<span class=" rel="external nofollow" layui-badge-dot"></span></a> </li> <li class="layui-nav-item"> <a href=""><img src=" rel="external nofollow" //t.cn/RCzsdCq" class="layui-nav-img">我</a> <dl class="layui-nav-child"> <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" >修改信息</a></dd> <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" >安全管理</a></dd> <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" >退了</a></dd> </dl> </li> </ul> </body> </html>
以上這篇關(guān)于layui導(dǎo)航欄不展示下拉列表的解決方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
BootStrap與validator 使用筆記(JAVA SpringMVC實現(xiàn))
這篇文章主要介紹了BootStrap與validator 使用筆記(JAVA SpringMVC實現(xiàn))的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2016-09-09基于BootStrap Metronic開發(fā)框架經(jīng)驗小結(jié)【七】數(shù)據(jù)的導(dǎo)入、導(dǎo)出及附件的查看處理
在很多系統(tǒng)模塊里面,我們可能都需要進行一定的數(shù)據(jù)交換處理,這樣可以很好的達到用戶操作體驗感,接下來通過本文給大家介紹基于BootStrap Metronic開發(fā)框架經(jīng)驗小結(jié)【七】數(shù)據(jù)的導(dǎo)入、導(dǎo)出及附件的查看處理相關(guān)知識,非常具有參考價值,感興趣的朋友一起學(xué)習(xí)吧2016-05-05