gpt4 book ai didi

html - 带有选择和清除图标的 Bootstrap 搜索框

转载 作者:行者123 更新时间:2023-11-28 17:23:43 32 4
gpt4 key购买 nike

我想要在 bootstrap 3+ 中带有选择选项和清除按钮的大搜索框。我尝试了下面的代码,但它没有正确对齐。

<form role="form">
<div class="row">
<div class="input-group">
<span class="input-group-addon glyphicon glyphicon-search"></span>
<select class="input-group-addon selectpicker">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</select>
<input Placeholder="Search Food" type="text" class="form-control input-lg hasclear">
<span class="clearer input-group-addon glyphicon glyphicon-remove-circle"></span>
</div>
</div>
</form>

演示:http://dietbook.xyz/

最佳答案

这是你想要的吗?

<div class="row">
<div class="col-lg-6">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Action <span class="caret"></span></button>
<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>
</div><!-- /btn-group -->
<input type="text" class="form-control"> <span class="input-group-addon glyphicon glyphicon-search"></span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->

关于html - 带有选择和清除图标的 Bootstrap 搜索框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27598440/

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