zoukankan      html  css  js  c++  java
  • Bootstrap练习:可折叠下拉菜单

    代码:

    <!DOCTYPE html>
    <html lang="zh-cn">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://blog-static.cnblogs.com/files/believepd/bootstrap.min.css">
    </head>
    <body>
    
    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingOne">
                <h4 class="panel-title">
                    <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"
                       aria-expanded="true" aria-controls="collapseOne">
                        菜单1
                    </a>
                </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                <div class="panel-body">
                    <p><button>宫爆鸡丁</button></p>
                    <p><button>宫爆鸡丁</button></p>
                    <p><button>宫爆鸡丁</button></p>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingTwo">
                <h4 class="panel-title">
                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"
                       aria-expanded="false" aria-controls="collapseTwo">
                        菜单2
                    </a>
                </h4>
            </div>
            <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                <div class="panel-body">
                    <p><button>宫爆鸡丁</button></p>
                    <p><button>宫爆鸡丁</button></p>
                    <p><button>宫爆鸡丁</button></p>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="headingThree">
                <h4 class="panel-title">
                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree"
                       aria-expanded="false" aria-controls="collapseThree">
                        菜单3
                    </a>
                </h4>
            </div>
            <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
                <div class="panel-body">
                    <p><button>宫爆鸡丁</button></p>
                    <p><button>宫爆鸡丁</button></p>
                    <p><button>宫爆鸡丁</button></p>
                </div>
            </div>
        </div>
    </div>
    
    <script type="text/javascript" src="https://blog-static.cnblogs.com/files/believepd/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="https://blog-static.cnblogs.com/files/believepd/bootstrap.min.js"></script>
    </body>
    </html>
    View Code

    效果:

  • 相关阅读:
    使用JQuery结合HIghcharts实现从后台获取JSON实时刷新图表
    Highcharts获取json数据展现pie饼图
    java数据类型,hibernate数据类型,标准sql数据类型之间的对应表
    hibernate 使用sql 查询(setResultTransformer)
    createSQLQuery的addEntity跟setResultTransformer方法
    spring+hibernate中的Result object returned from HibernateCallback isn't a List
    改变MyEclipse创建JSP时默认的pageEncoding编码
    poj 1330 Nearest Common Ancestors 单次LCA/DFS
    poj 1328 Radar Installation 排序贪心
    brainfuck 解释器
  • 原文地址:https://www.cnblogs.com/believepd/p/9844276.html
Copyright © 2011-2022 走看看