如何在導航欄中設置100%的搜索輸入寬度?Bootstrap 4 - 如何在導航欄中設置100%的搜索輸入寬度?
領域是有限的,寬度:
<nav class="navbar navbar-light navbar-dark bg-inverse">
<a class="navbar-brand" href="#">Navbar</a>
<ul class="nav navbar-nav">
<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="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
</ul>
<ul class="nav navbar-nav pull-xs-right">
<li class="nav-item">
<form class="form-inline ">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</li>
<li class="nav-item">
<a class="nav-link" href="#">User Name</a>
</li>
</ul>
</nav>
這裏是小提琴:
https://jsfiddle.net/Dieselnick/tdoz2o4d/
添加一些你希望我們爲你做什麼exaclty更多的細節? –
尋求調試幫助的問題必須包含在問題本身中重現**所需的最短代碼。**注意:請不要濫用代碼塊來解決此問題**。 –