我正在使用twitter bootstrap响应式导航栏,我正在试图弄清楚如何在导航栏处于折叠模式时显示该品牌.
我认为可能需要一些额外的js涉及,但我不知道那是什么或放在哪里.
这就是我所得到的:
<div class="navbar"> <div class="navbar-inner"> <div class="container"> <!-- .btn-navbar is used as the toggle for collapsed navbar content --> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <!-- Be sure to leave the brand out there if you want it shown --> <a class="brand" href="#">Navigation</a> <!-- Everything you want hidden at 940px or less,place within here --> <div class="nav-collapse collapse"> <!-- .nav,.navbar-search,.navbar-form,etc --> <ul class="nav nav-pills"> <li><a href="#">Nav 1</a></li> <li><a href="#">Nav 2</a></li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Programs <b class="caret"></b> </a> <ul class="dropdown-menu"> <!-- links --> <li><a href="#">Program 1</a></li> <li><a href="#">Program 2</a></li> <li><a href="#">Program 3</a></li> <li class="divider"></li> <li><a href="#">Program A</a></li> <li><a href="#">Program B</a></li> <li><a href="#">Program C</a></li> </ul> <!-- closes dropdown menu --> </li> <!-- closes dropdown class --> </ul> <!-- closes nav-pills --> </div> <!-- closes collapse --> </div> <!-- closes container --> </div> <!-- closes navbar-inner --> </div> <!-- closes overall navbar -->
现在,品牌一直显示,但是我希望它只在折叠模式下显示,所以观众知道是导航栏.他们不需要在更大的屏幕模式下看到它.
任何资源可能有帮助.
谢谢你的时间.
克雷格