我剛開始使用Bootstrap,我對導航欄有這個對齊問題。該鏈接移到下一行上桌面:Bootstrap 3導航欄對齊問題
這裏的工作演示:http://jsfiddle.net/b5mbbwgb
代碼:
<div class = "navbar navbar-inverse navbar-static-top">
<div class = "container">
<div class="navbar-header">
<button class = "navbar-toggle pull-left" data-toggle = "collapse" data-target = "#nav-header-links-collapse">
<span class = "icon-bar"></span>
<span class = "icon-bar"></span>
<span class = "icon-bar"></span>
</button>
<a class="navbar-brand navbar-brand-centered" href="#" data-toggle = "collapse" data-target = "#nav-header-logo-collapse">
<img alt="logo" width="164" height="30" src="http://placehold.it/164x30?text=LOGO">
</a>
<a class = "navbar-toggle pull-right glyphicon glyphicon-search" data-toggle = "collapse" data-target = "#nav-header-search-collapse">
</a>
</div>
<div class = "collapse navbar-collapse" id="nav-header-search-collapse">
<form class="nav 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>
<div class = "collapse navbar-collapse" id="nav-header-links-collapse">
<ul class = "nav navbar-nav navbar-right">
<li class = "active"><a href = "#">Home</a></li>
<li><a href = "#">Social</a></li>
<li><a href = "#">Contact</a></li>
<li><a href = "#">About</a></li>
</ul>
</div>
</div>
</div>
無數次嘗試,我不能夠解決這些後問題:
- 鏈接移動到下一行
- 搜索輸入的頂部有&底部的行。見下面
截圖有人能給我需要做來解決這些問題2什麼提示嗎?我在學習,所以我也會欣賞一個基本的解釋。謝謝!
是的,這完全是。但我不知道你做了什麼改變:D。編輯:移動搜索的頂部/底部的線仍然存在,但。 – Yeti
@Yeti,你能提供截圖嗎? – LiranBo
它在原始帖子中,在底部。 – Yeti