gpt4 book ai didi

html - Bootstrap 默认导航栏中添加的按钮位置不正确

转载 作者:太空宇宙 更新时间:2023-11-04 11:05:46 26 4
gpt4 key购买 nike

所以我在默认的 Bootstrap 导航栏中添加了一个按钮

默认引导导航栏

                          <nav class="navbar navbar-default ">
<div class="container-fluid ">
<!-- Brand and toggle get grouped for better mobile display -->

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse clearfix" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">

<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></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 role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>

<button class="btn btn-primary pull-left"><span class="glyphicon glyphicon-refresh"></span> Refresh</button>


<form class="navbar-form navbar-left pull-right" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<div class = "clearfix"></div>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>

添加了刷新按钮

<button class="btn btn-primary"><span class="glyphicon glyphicon-refresh"></span> Refresh</button>

这个我已经试过了Bootstrap 3 panel header with buttons wrong position但它没有用。

screenshot

我想要的是刷新按钮与其他组件对齐。提前致谢

最佳答案

你应该像这样使用内联类:

  <form class="navbar-form form-inline">
<input type="text" class="search-query">
<div class="btn-group">
<button class="btn">1</button>
<button class="btn">2</button>
</div>
</form>

更多示例:

http://getbootstrap.com/components/#navbar

关于html - Bootstrap 默认导航栏中添加的按钮位置不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33979464/

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