gpt4 book ai didi

html - 如何在 Bootstrap 的下拉列表中添加输入

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

我试图在按钮下拉列表中添加输入,但它与下拉列表的空间重叠。请在下面查看我的代码。

<ul class="dropdown-menu">
<li class="dropdown-header">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<input type="text" class="input-sm form-control">
<button class="btn btn-sm btn-primary">Ok</button>
</div>
</div>
</div>
</li>
</ul>

截图:

enter image description here

最佳答案

<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>

关于html - 如何在 Bootstrap 的下拉列表中添加输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55526716/

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