【发布时间】:2021-03-11 15:55:23
【问题描述】:
我已经自定义了select2 dropdown 的高度。但是appendbutton的高度无法正确自定义。
下面是我的html
<div class="input-group input-group-sm">
<select class="form-control form-control-sm select2">
<option value="">Select Supplier</option>
</select>
<div class="input-group-append">
<input class="btn btn-sm btn-outline-secondary" type="button" value="..." />
</div>
</div>
下面是自定义的css
.select2, .select2-selection__rendered {
line-height: calc(1em + .1rem + 0px) !important;
padding-top:5px;
}
.select2-container .select2-selection--single {
height: calc(1.5em + .4rem + 0px) !important;
}
.select2-container--bootstrap4 .select2-selection--multiple {
min-height: calc(1em + .75rem + 2px) !important;
}
.select2-selection__arrow {
height: calc(1.5em + .5rem + -30px) !important;
}
【问题讨论】:
-
我测试了这段代码,但它们的高度相同。是否与其他元素冲突?
标签: javascript html css asp.net-core jquery-select2