相关疑难解决方法(0)

更改Duallistbox中单击的选项的背景颜色

我正在使用bootstrap-duallistbox

当前,当用户从任一框中单击一个选项时,该选项的背景变为蓝色一秒钟,然后该选项移动到另一个选择框。

在此处输入图片说明

我想将颜色从蓝色更改为其他颜色。

这到底是什么状态?CSS应用option:activeoption:hoveroption:focus不干活,就选择此状态,并改变颜色。

我以为这可能有用,但也失败了。

select:-internal-list-box option:checked {
    color: #333 !important;
    background-color: #FFC894 !important;
}
Run Code Online (Sandbox Code Playgroud)

也没有:

select:-internal-list-box option:selected  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

select:-internal-list-box:focus  option:checked  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

select:-internal-list-box:focus  option:selected  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

select:-internal-list-box:focus option::selection  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

.bootstrap-duallistbox-container:focus select option::selection {
    background: #ffb7b7 !important;
}
Run Code Online (Sandbox Code Playgroud)

单击选项时如何更改显示的背景颜色?

这是一个显示问题的jsFiddle

html css twitter-bootstrap drop-down-menu

6
推荐指数
1
解决办法
6825
查看次数

标签 统计

css ×1

drop-down-menu ×1

html ×1

twitter-bootstrap ×1