重置选择框
appearance
和
height
通过引导程序增值,然后它将按预期工作,请查看下面的工作片段,希望对您有所帮助:)
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<style>
select.form-control.border-foo:not([size]):not([multiple]) {
height: auto;
}
.border-foo {
border-style: solid;
border-width: 3px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
</style>
<br>
<div class="row">
<div class="col-6">
<input type="text" id="textbox" class="form-control border-foo" />
</div>
<div class="col-6">
<select id="select" class="form-control border-foo">
<option>test</option>
</select>
</div>
</div>