0
我想複製我的「提交」按鈕。當我這樣做時,似乎bootstrap認爲重複是導航條的分開,所以當我做style =「margin-top:30px;」導航欄基本上會增長,直到它到達按鈕。在這裏看看:http://jsfiddle.net/aqs2z6oo/我想知道如何使用該按鈕並使其成爲自己的,因此我可以在頁面內移動它。我已經嘗試了一些東西,如把按鈕形式放在容器和行div中,但他們似乎不工作。分離引導按鈕
<a class="navbar-brand" href="#"><img src="img/logo.png" style="position: relative; top: -7.5px;" /></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 <span class="caret"></span></a>
<ul class="dropdown-menu" role="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 linkk</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" size=60px>
</div>
<button type="submit" class="btn btn-default" value="Open Window" onclick="window.open('http://www.cnn.com')">Submit</button>
</form>
<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 <span class="caret"></span></a>
<ul class="dropdown-menu" role="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 -->
提交
你應該像這樣在你的小提琴中包含Bootstrap CSS作爲外部資源:http://jsfiddle.net/aqs2z6oo/1/ – Dan 2014-09-29 22:09:05