css 防止chrome中输入字段的丑陋自动填充背景颜色。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 防止chrome中输入字段的丑陋自动填充背景颜色。相关的知识,希望对你有一定的参考价值。

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  transition: background-color 5000s ease-in-out 0s;
}

/* or */

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset;
  box-shadow: 0 0 0 1000px white inset;
}

以上是关于css 防止chrome中输入字段的丑陋自动填充背景颜色。的主要内容,如果未能解决你的问题,请参考以下文章