当前,当用户从任一框中单击一个选项时,该选项的背景变为蓝色一秒钟,然后该选项移动到另一个选择框。
我想将颜色从蓝色更改为其他颜色。
这到底是什么状态?CSS应用option:active,option:hover,option: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)
单击选项时如何更改显示的背景颜色?