查看Chrome和Firefox中的http://demo.neeraj.name/admin_data.在Firefox中,选择框具有较大的高度.在Chrome中,选择框的高度非常小.
如何让chrome和safari的选择框看起来像Firefox的选择下拉?
我正在使用select2作为自定义选择框。但我无法更改箭头图标。innerHTML不起作用。我能做些什么来对抗它?
$(".position-select").select2({
dropdownParent: $(".choose-position")
});
// $('b[role="presentation"]').remove();
// this not working!
$('.choose-position select2-arrow').append(
'<svg style="fill:red" width="36" height="36" viewBox="0 0 36 36"><path d="M2 26h32L18 10 2 26z"></path></svg>'
);Run Code Online (Sandbox Code Playgroud)
* {
font-family: "Segoe UI", Roboto, sans-serif;
}
.choose-position .select2-container {
width: 100% !important;
}
.choose-position .select2-container--default .select2-selection--single {
width: 100% !important;
display: flex;
align-items: center;
padding: 0 30px;
height: 50px;
line-height: 50px;
font-weight: 500;
font-size: 16px;
background-color: #fafafa;
border: 1px solid #eeeeee;
border-radius: 25px;
transition: 0.1s;
}
.choose-position …Run Code Online (Sandbox Code Playgroud)