我有一个响应 固定顶部导航栏(使用 Twitter Bootstrap 3 ),如下所示:
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header"><a href="/"><img src="/images/citylightslogo.png" alt="logo" id="cllogo"/></a>
</div>
**<h1 id="topline2">• Tagline1 </h1>
<h1 id="topline3">• Address • Call Anytime! xxx xxx xxxx </h1>
<div id="adspace" >
<h1 id="headline33" class =".visible-xs" >100% Satisfaction Guaranteed! Call us Anytime! </h1>
</div>
<div id="logospace"><a href="http://www.angieslist.com"><img src="/images/ab2.gif" alt="logo" id="alogo2"/></a><a href="/"><img src="/images/ab2.gif" alt="logo" id="alogo3"/></a>
</div>**
</div>
</div>
我只是想确保我正在正确地学习 :目前,折叠后,上面的粗体中的元素遍布整个地方(进入其他行)。
问题:在折叠时,如何确定折叠时不可见或移动设备或平板电脑屏幕中部分可见?< / p>
事实是我没有在“navabar-header”类中包含这些元素的问题,或者我应该将它们包装在一个单独的div中以开始(如果是这样的div?)?
似乎自举文档专注于解释如何使导航栏链接 响应,而我似乎无法找到任何关于制作非链接内容的内容(如标题)响应。
谢谢!
答案 0 :(得分:0)
完全不了解目标,但让我对它进行一次破解......听起来你想要的不仅仅是菜单项崩溃......对吗?大!见下文
- &GT; http://www.bootply.com/118940
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<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="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-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>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<div class="col-sm-3 col-md-3">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-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><!-- /.navbar-collapse -->
</nav>
中的所有内容
class="collapse navbar-collapse"
会崩溃......
在此处查看 - &gt; http://www.bootply.com/118940