gpt4 book ai didi

html - Twitter bootstrap 3 navbar navbar-right outside navbar-collapse

转载 作者:太空狗 更新时间:2023-10-29 13:19:02 28 4
gpt4 key购买 nike

在 Twitter bootstrap 2.3.2 中,我可以有类似的东西: http://jsfiddle.net/aQwUZ/3/

<div class="navbar navbar-inverse navbar-fixed-top">

<div class="navbar-inner">
<div class="container">

<a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a href="#" class="brand">BRAND</a>
<ul class="nav pull-right">
<li>
<a href="#">Fixed Link</a>
</li>
</ul>

<div class="nav-collapse">
<ul class="nav">
<li><a href="#">L1</a></li>
<li><a href=#">L2</a></li>
</ul>
</div>

</div>
</div>
</div>

Twitter Bootstrap 导航栏,在移动响应 View 中,“固定链接”在标题中保持可见。

现在,在 bootstrap 3 中,升级我的代码后,我只能拥有: http://jsfiddle.net/EC3Ly/4/

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">BRAND</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#">Fixed Link</a>
</li>
</ul>
<div class="navbar-collapse collapse">

<ul class="nav navbar-nav">
<li><a href="#">L1</a></li>
<li><a href=#">L2</a></li>
</ul>

</div>

</div>
</nav>

在移动响应 View 中,我得到 2 行...我试图包裹在“导航栏标题”节点 http://jsfiddle.net/EC3Ly/5/或者在第一个“navbar-header”中没有成功。

我错过了什么?

谢谢,

亚历山大

最佳答案

我遇到了与 BS3 相同的问题,我发现解决它的唯一方法是结合使用 pull-leftpull-right

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header pull-left">
<a class="navbar-brand" href="#">BRAND</a>
</div>
<div class="navbar-header pull-right">
<ul class="nav navbar-nav pull-left">
<li>
<a href="#">Fixed Link</a>
</li>
</ul>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="#">L1</a></li>
<li><a href="#">L2</a></li>
</ul>
</div>
</div>
</nav>

工作演示:http://bootply.com/78856

关于html - Twitter bootstrap 3 navbar navbar-right outside navbar-collapse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18610249/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com