如何从伪元素-internal-input-suggested中删除样式? [英] How can I remove the styles from the pseudo element -internal-input-suggested?
问题描述
从Google Chrome浏览器的 76.0.3809.100 版本开始,我有了一个新的伪元素来自动完成输入.我需要自动完成功能,但默认情况下需要删除样式.
As of the version 76.0.3809.100 of Google Chrome, I have a new pseudo element to autocomplete the inputs. I want the autocomplete function but I need remove the styles by default.
<div pseudo="-internal-input-suggested" id="placeholder" style="display: block
!important;">
myEMail@gmail.com
</div>
默认情况下在Chrome上应用的样式:
input::-internal-input-suggested, textarea::-internal-input-suggested {
font: 400 13.3333px Arial !important;
}
我正在尝试在CSS上使用相同的 input ::-internal-input-suggested,textarea ::-internal-input-suggested 覆盖,但我做不到.
I'm trying overwrite with the same input::-internal-input-suggested, textarea::-internal-input-suggested on my css but I can not.
推荐答案
卡洛斯.这是Chrome错误#991157 ,
Carlos. This is Chrome bug #991157, #953689 with status WontFix.
我发现的解决方法是使用:-webkit-autofill
和:-webkit-autofill:first-line
The workaround I found is using :-webkit-autofill
and :-webkit-autofill:first-line
input:-webkit-autofill,
input:-webkit-autofill:first-line {
font-size: initial;
line-height: inherit;
/* font-family: font name; */
}
这篇关于如何从伪元素-internal-input-suggested中删除样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!