崩溃一些并保持一些导航链接可见 - bootstrap

时间:2014-12-19 14:54:48

标签: twitter-bootstrap

我想折叠一些导航链接,并在浏览器宽度减少时保持其他链接可见。 即从下面的代码中,我只想折叠登录,关于和联系,并让折叠(图标栏)左侧的购物车可见。知道我怎么能实现这个目标吗?

<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="~/">Nav</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#"><i class="fa fa-shopping-cart"></i>Cart</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Contact</a></li>
                <li><a href="~/login.cshtml"><span class="glyphicon glyphicon-log-in"></span>Login</a></li>
            </ul>
        </div><!--/.navbar-collapse -->
    </div>

0 个答案:

没有答案