【问题标题】:How can I remove the styles from the pseudo element -internal-input-suggested?如何从伪元素-internal-input-suggested 中删除样式?
【发布时间】:2019-12-24 08:46:51
【问题描述】:

从 Google Chrome 的 76.0.3809.100 版本开始,我有一个新的伪元素来自动完成输入。我想要自动完成功能,但我需要默认删除样式。

<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 进行覆盖,但我不能。

【问题讨论】:

    标签: css google-chrome chromium


    【解决方案1】:

    卡洛斯。这是 Chrome 错误 #991157#953689,状态为 WontFix。

    我发现的解决方法是使用:-webkit-autofill:-webkit-autofill:first-line

    input:-webkit-autofill,
    input:-webkit-autofill:first-line {
        font-size: initial;
        line-height: inherit;
        /* font-family: font name; */
    }
    

    【讨论】:

      猜你喜欢
      • 2020-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-01
      相关资源
      最近更新 更多