neeter

Chrome下的输入框控件如果选择了保存的自动填充的值,背景颜色将变成黄色并且无法通过css的background属性修改

事实上有很多方法可以进行这个背景颜色的更改,下面记录一个简单的方法

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active  {
     -webkit-box-shadow: 0 0 0 68px #393A59 inset;
}

此方法适用于输入框背景为纯色的场景,若要更改文本颜色css的color属性也不能直接修改,添加属性

-webkit-text-fill-color: white!important

 

分类:

技术点:

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2021-08-13
  • 2021-11-23
  • 2021-12-19
  • 2021-12-19
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案