我使用以下代码删除了select控件的默认蓝色高亮显示:
.ps_select:focus::-ms-value {
/* For IE10 and above to remove blue hightlight */
background-color: inherit;
}虽然这在正常模式下工作,但它的对比度并不高。您将看到select控件的焦点上有一个紫色的背景。这意味着在高对比度模式下,蓝色仍然被使用,而对比则使之变成紫色。
有什么解决办法吗?还是这是个窃听器?
我正在使用IE11
发布于 2014-12-18 10:52:39
@media all and (-ms-high-contrast: active) {
/* Remove purple highlight in HC mode */
.ps_select:focus::-ms-value{
background-color: transparent; /*make the select background transparent in ie */
color: white;
}
}
@media all and (-ms-high-contrast: none) {
/* Remove blue highlight in Normal mode*/
.ps_select:focus::-ms-value{
background-color: transparent;
color: black;
}
}https://stackoverflow.com/questions/27542199
复制相似问题