在Bootstrap 3中,您可以从下拉按钮轻松删除“插入符号”(指向下方的小箭头),但我无法看到如何在Bootstrap 4中执行此操作,因为它们不再使用< span class =“caret”> ;< /跨度取代.
<div class="input-group mb-3"> <div class="input-group-prepend"> <button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</button> <div class="dropdown-menu"> <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 role="separator" class="dropdown-divider"></div> <a class="dropdown-item" href="#">Separated link</a> </div> </div> <input type="text" class="form-control" aria-label="Text input with dropdown button"> </div>
解决方法
它是在css中完成的.做那样的事情:
.dropdown-toggle:after { content: none }