• bootstrap3级下拉菜单 及 CSS实现三级下拉菜单分析


    <!DOCTYPE HTML>  
    <html lang="zh-CN">  
    <head>  
        <meta charset="UTF-8">  
        <title>Bootstrap 3 的多级下拉菜单示例</title>  
        <script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>  
        <link rel="stylesheet" href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"/>  
        <script type="text/javascript" src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>  
        <style type="text/css">  
            .dropdown-submenu {  
                position: relative;  
            }  
            .dropdown-submenu > .dropdown-menu {  
                top: 0;  
                left: 100%;  
                margin-top: -6px;  
                margin-left: -1px;  
                -webkit-border-radius: 0 6px 6px 6px;  
                -moz-border-radius: 0 6px 6px;  
                border-radius: 0 6px 6px 6px;  
            }  
            .dropdown-submenu:hover > .dropdown-menu {  
                display: block;  
            }  
            .dropdown-submenu > a:after {  
                display: block;  
                content: " ";  
                float: right;  
                 0;  
                height: 0;  
                border-color: transparent;  
                border-style: solid;  
                border- 5px 0 5px 5px;  
                border-left-color: #ccc;  
                margin-top: 5px;  
                margin-right: -10px;  
            }  
            .dropdown-submenu:hover > a:after {  
                border-left-color: #fff;  
            }  
            .dropdown-submenu.pull-left {  
                float: none;  
            }  
            .dropdown-submenu.pull-left > .dropdown-menu {  
                left: -100%;  
                margin-left: 10px;  
                -webkit-border-radius: 6px 0 6px 6px;  
                -moz-border-radius: 6px 0 6px 6px;  
                border-radius: 6px 0 6px 6px;  
            }  
        </style>  
    </head>  
    <body>  
    <div class="container">  
        <div class="row">  
            <h2>Bootstrap 3多级下拉菜单</h2>  
            <hr>  
            <div class="dropdown">  
                <a id="dLabel" role="button" data-toggle="dropdown" class="btn btn-primary" data-target="#"  
                   href="javascript:;">  
                    下拉多级菜单 <span class="caret"></span>  
                </a>  
                <ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">  
                    <li><a href="javascript:;">一级菜单</a></li>  
                    <li><a href="javascript:;">一级菜单</a></li>  
                    <li class="divider"></li>  
                    <li class="dropdown-submenu">  
                        <a tabindex="-1" href="javascript:;">一级菜单</a>  
                        <ul class="dropdown-menu">  
                            <li><a tabindex="-1" href="javascript:;">二级菜单</a></li>  
                            <li class="divider"></li>  
                            <li class="dropdown-submenu">  
                                <a href="javascript:;">二级菜单</a>  
                                <ul class="dropdown-menu">  
                                    <li><a href="javascript:;">三级菜单</a></li>  
                                </ul>  
                            </li>  
                        </ul>  
                    </li>  
                </ul>  
            </div>  
        </div>  
    </div>  
    </body>  
    </html> 
    

      原文链接

    CSS实现三级下拉菜单分析

  • 相关阅读:
    Orchard:打包和共享模块
    Orchard:处理1对多的关系
    SOA:服务集成成熟度模型(Service Integration Maturity Model)
    读书笔记:遇见未知的自己
    101与金根回顾敏捷个人:(83)如何组织一个学习小组
    色拉英语第2集第5幕:Do you speak English
    Orchard: Shape展现介绍
    Black Cat有声名著【1】1 Peter Pan 彼得.潘 【故事介绍】
    产品管理:孵化产品Beta流程
    色拉英语第4集第1幕: where Am I
  • 原文地址:https://www.cnblogs.com/GetLastError/p/7767075.html
Copyright © 2020-2023  润新知