gpt4 book ai didi

html - 选择控件的默认蓝色突出显示在 IE11 中无法在高对比度模式下工作

转载 作者:可可西里 更新时间:2023-11-01 13:09:20 25 4
gpt4 key购买 nike

我使用以下代码删除了选择控件的默认蓝色突出显示:

.ps_select:focus::-ms-value {
/* For IE10 and above to remove blue hightlight */
background-color: inherit;
}

虽然这在正常模式下有效,但在高对比度下并不适用。您会看到选择控件的焦点上有一个紫色背景。这意味着在高对比度模式下,蓝色仍然被使用,对比使它变成紫色。

有解决办法吗?或者这是一个错误?

我正在使用 IE11

最佳答案

@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;
}
}

关于html - 选择控件的默认蓝色突出显示在 IE11 中无法在高对比度模式下工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27542199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com