gpt4 book ai didi

css - Bootstrap - 如何将输入对齐?

转载 作者:行者123 更新时间:2023-11-28 15:16:27 25 4
gpt4 key购买 nike

我从这个例子中复制了导航栏: https://v4-alpha.getbootstrap.com/components/navbar/

<div class="container">
<h3>Nawigacja zamknieta w kontenerze</h3>
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">Navbar</a>

<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>

但是我的搜索按钮没有正确对齐?这是怎么回事?我该如何更改它?

enter image description here

最佳答案

您可以在按钮中使用 pull-right 属性。

关于css - Bootstrap - 如何将输入对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42892937/

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