码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap响应式折叠导航

时间:2015-09-12 17:30:24      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

浏览器宽度缩小到一定值时,导航显示为

技术分享

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!--折叠显示图标-->
    <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#a">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a href="#" class="navbar-brand">tinyphp</a>
    </div>

    <!--导航折叠-->
    <div class="collapse navbar-collapse" id="a">
        <ul class="nav navbar-nav">
            <li class="active">
                <a href="#">Home</a>
            </li>
            <li class="dropdown">
                <a href="#" class="btn dropdown-toggle" data-toggle="dropdown" >Address <span class="caret"></span></a>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                    <li><a href="#">Something else here</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Separated link</a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>

</nav>

 

详情:http://v3.bootcss.com/components/#navbar

Bootstrap响应式折叠导航

标签:

原文地址:http://www.cnblogs.com/tinyphp/p/4803048.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!