Html Can';t删除组合框中的悬停颜色
我正在使用选择2Html Can';t删除组合框中的悬停颜色,html,css,ui-select2,Html,Css,Ui Select2,我正在使用选择2组合框,我想删除蓝色悬停样式,但无法删除,无法退出。我怎么做?请给我一个解决方案,谢谢 Js jQuery(document).ready(function($){ $('select').select2({width:100}); $('b[role="presentation"]').hide(); $('.select2-selection__arrow').append('<i class="fa fa-angle-down"><
组合框
,我想删除蓝色悬停样式,但无法删除,无法退出。我怎么做?请给我一个解决方案,谢谢
Js
jQuery(document).ready(function($){
$('select').select2({width:100});
$('b[role="presentation"]').hide();
$('.select2-selection__arrow').append('<i class="fa fa-angle-down"></i>');
});
如果只想从
:hover
上的元素中删除蓝色背景,可以添加以下代码行:
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background: inherit;
color: inherit;
}
如果您只想从
:hover上的元素中删除蓝色背景,您可以添加以下代码行:
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background: inherit;
color: inherit;
}
用于此css
的悬停和默认背景色
html .select2-container--default .select2-results__option--highlighted[aria-selected]{background-color: green;}
html .select2-container--default .select2-results__option--highlighted[aria-selected]{color:#000;}
html .select2-container--default .select2-results__option[aria-selected=true]{background-color:red;}
用于此css
的悬停和默认背景色
html .select2-container--default .select2-results__option--highlighted[aria-selected]{background-color: green;}
html .select2-container--default .select2-results__option--highlighted[aria-selected]{color:#000;}
html .select2-container--default .select2-results__option[aria-selected=true]{background-color:red;}
加载项样式
.select2-container--default .select2-results__option[aria-selected="true"]
{
background:#fff;
}
.select2-container--default .select2-results__option--highlighted[aria-selected]
{
background:green;
color:#fff;
}
外接程序样式
.select2-container--default .select2-results__option[aria-selected="true"]
{
background:#fff;
}
.select2-container--default .select2-results__option--highlighted[aria-selected]
{
background:green;
color:#fff;
}
将以下内容添加到CSS代码中,因为导致蓝色悬停效果的代码位于缩小的CSS文件中,很难编辑:
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: lightgreen !important;
color: white;
}
.select2-container--default .select2-results__option[aria-selected=true] {
background-color: inherit;
}
将以下内容添加到CSS代码中,因为导致蓝色悬停效果的代码位于缩小的CSS文件中,很难编辑:
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: lightgreen !important;
color: white;
}
.select2-container--default .select2-results__option[aria-selected=true] {
background-color: inherit;
}
我想添加绿色并去除白色和灰色我想添加绿色并去除白色和灰色我想添加绿色并去除白色和灰色