回到目录

在bootstrap官方来说,导航最多就是两级,两级以上是无法实现的,大叔找了一些第三方的资料,终于找到一个不错的插件,使用上和效果上都还不错,现在和大家分享一下

插件地址:http://vsn4ik.github.io/bootstrap-submenu/

先看一下,在大叔后台系统上的显示效果

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoQAAAHMCAIAAADDNi6EAAAgAElEQVR4nO3d7W8b153o8f1r/HJ30wHyB4TApsh9dVOW7xfIiwJBt3VAgKhfXGxwYbS1AQOBsCwC38Vd9NYtGmQNaLuEkTRy4zZG7cSKxdqUQknUkzWyHvggSiJlirbnvjjk4eHMGYpPc2ZEfj8wCouiKLpk+NXvzBnq7xwAABCqvwv7DgAAMO2IMQAAISPGAACEjBgDABAyYgwAQMiIMQAAISPGAACEjBgDABAyYgwAQMgGi/HZ2dne3t7GxkYBk2hzc3Nvb+/s7CygZxtPJADQGiDGZ2dnGxsbR0dH9Xq9hklUr9ePjo42NjYC7TFPJABw6TfGr1+/3tvbOzo6CvsOI3BHR0d7e3uvX78OosQ8kQDAq98Yv3r1amNjg1FmGtTr9c3NzWazGUSMeSIBgFe/MX758mWhUAj73sKQQqHQaDSCiDFPJADwIsbQIMYAYBIxhkahUHjx4gUxBgAziDE0iDEAmESMoUGMAcAkYgwNYgwAJhFjaBBjADCJGEODGAOAScQYGsQYAEwixtAgxgBgEjGGBjEGAJPMxLiQfPetjz6Zb33w8PZbVnxef7V3bz/s+i7zn3z01rtJ9aLCw9tvWb7ilz/q/eUfXY67rgOviMV4Pt5+wsx/8pH2cVcf5ds3kskbt/v/t47xyQkAwwkwxh9djvtHU/8yKkIrXxm1L3aFh7ff9XkFvH0jqYS2kHy3U23l1Xk+br3lelWFS6RiXHj48N9vJK3uR82/mn3FOKAnJwAMJyqTsd/EI3V/ua/uGLdGmds3kskbN7SvvoOMUFMkUjEWun/S6lVcz6fmux96149i43xyAsBwQjhmrNZUnTN6vNR+dDmuvlz2nozbr9qF5Lvv3rjxoWXFbwy2boloxVg+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AhIwYAwAQMmIMAEDIiDEAACEjxgAAhIwYAwAQMmIMAEDI/j97uPMLBEd+rQAAAABJRU5ErkJggg==" alt="" />

下面说一下实现的方式

1 引用三个JS插件和一个CSS类库

    <script src="~/Content/bootstraps/JS/bootstrap-submenu.js"></script>
<script src="~/Content/bootstraps/JS/highlight.min.js"></script>
<script src="~/Content/bootstraps/JS/docs.js"></script>
<link href="~/Content/bootstraps/CSS/bootstrap-submenu.css" rel="stylesheet" />

2 插入对应的HTML代码块,本例子没有使用递归生成代码,使用了静态的三级结构,这样看着更清晰,真正的生产环境建议使用递归去生产菜单

<ul class="nav nav-pills">

    @foreach (var item in Model)
{
if (item.Sons != null && item.Sons.Count > 0)
{ <li class="dropdown">
<a data-submenu="" data-toggle="dropdown" tabindex="0">@item.MenuName<span class="caret"></span></a>
<ul class="dropdown-menu">
@foreach (var sub in item.Sons)
{
if (sub.Sons != null && item.Sons.Count > 0)
{ <li class="dropdown-submenu">
<a tabindex="0">@sub.MenuName</a>
<ul class="dropdown-menu">
@foreach (var inner in sub.Sons)
{
<li>
<a href="@inner.LinkUrl">@inner.MenuName</a>
</li>
} </ul>
</li>
<li class="divider"></li> } else
{
<li><a href="@sub.LinkUrl">@sub.MenuName</a></li>
}
}
</ul>
</li>
}
else
{
<li><a href="@item.LinkUrl">@item.MenuName</a></li>
}
}
</ul>

最后的效果就是第一个图了,值得注意的是,如果希望每个菜单之间使用分割线,可以添加  <li class="divider"></li>这行代码。

感谢各位的阅读!

回到目录

Bootstrap~多级导航(级联导航)的实现的更多相关文章

  1. Bootstrap<基础十六> 导航元素

    Bootstrap 提供的用于定义导航元素的一些选项.它们使用相同的标记和基类 .nav.Bootstrap 也提供了一个用于共享标记和状态的帮助器类.改变修饰的 class,可以在不同的样式间进行切 ...

  2. Bootstrap系列 -- 37. 基础导航样式

    Bootstrap框架中制作导航条主要通过“.nav”样式.默认的“.nav”样式不提供默认的导航样式,必须附加另外一个样式才会有效,比如“nav-tabs”.“nav-pills”之类.比如右侧代码 ...

  3. Bootstrap两端对齐的导航实例

    Bootstrap两端对齐的导航,样式剥离出来代码如下: <!DOCTYPE html> <html> <head> <title>Bootstrap ...

  4. BootStrap学习(3)_导航菜单

    一.导航元素 1.表格导航或标签 以一个带有 class .nav 的无序列表开始. 添加 class .nav-tabs. <!DOCTYPE html> <html xmlns= ...

  5. Bootstrap(7) 输入框和导航组件

            一.输入框组件 文本输入框就是可以在<input>元素前后加上文字或按钮,可以实现对表单控件的扩展. //在左侧添加文字 <!-- //在左侧添加文字 --> ...

  6. Bootstrap学习-菜单-按钮-导航

    1.下拉菜单(基本用法) 在使用Bootstrap框架的下拉菜单时,必须调用Bootstrap框架提供的bootstrap.js文件.当然,如果你使用的是未编译版本,在js文件夹下你能找到一个名为“d ...

  7. Bootstrap历练实例:导航内的下拉菜单

    <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content=&q ...

  8. bootstrap输入框组、导航和导航条

    输入框组(input groups) 避免使用select  支持不好,使用输入框组 尺寸根据  input-group-lg    input-group-sm来选择   <div class ...

  9. Bootstrap历练实例:导航中的表单

    Bootstrap历练实例:导航中的表单,它是使用class.navbar-form类,这确保了表单适当的垂直对齐和在较窄的视口中折叠的行为,使用这个对齐方式选项来决定导航栏中的内容放置在哪里. 实例 ...

随机推荐

  1. Process 执行shell 脚本

    概述: Process类是一个抽象类(所有的方法均是抽象的),封装了一个进程(即一个执行程序). Process 类提供了执行从进程输入.执行输出到进程.等待进程完成.检查进程的退出状态以及销毁(杀掉 ...

  2. 站内信对话列表sql语句

  3. 1、在MAC上搭建React Native开发环境

    @import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/c ...

  4. 成都印迹婚纱摄影 | yinjilove.com

    成都印迹婚纱摄影工作室 官方网站:http://yinjilove.com/ 联系方式:028-84278563 手机及微信号:18180642817 微信公众号:印迹摄影 地址:成都市锦江区牛王庙东 ...

  5. oracle入门必备

    //................创建表空间 \  赋予角色  \ 创建数据表  \  插入数据  \  创建序列  \ 添加注释   ........................... --创 ...

  6. case when then else end 用法

    前段时间做项目过程中制作报表时编写的sql需要用到的case when then else end,因此将case的用法总结一下吧. CASE命令有两种语句格式:语法形式1:CASE expressi ...

  7. Strong name signature not valid for this assembly Microsoft.mshtml.dll

    Strong name signature not valid for this assembly Microsoft.mshtml.dll  http://social.msdn.microsoft ...

  8. android开发时使用游标时一定要关闭

    原代码如下: places = getPlaceDatas(context, cursor); cursor.close(); 应改为: try{ places = getPlaceDatas(con ...

  9. 安装CAS服务器

    1.简介 参考: http://www.coin163.com/java/cas/cas.html CAS主要用于多系统单点登录,属于WEB SSO.SSO体系主要角色有三种:User(多个),WEB ...

  10. java war包加载提示jar not loaded

    今天在开发的时候,项目需要加载Guvnor的war包.War包部署后,启动tomcat提示jar not load 后来查阅资料后发现是Jar包冲突导致的,冲突的Jar包在tomcat中已经存在,然后 ...