修改input框默认黄色背景

Posted Apple

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了修改input框默认黄色背景相关的知识,希望对你有一定的参考价值。

input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    background-color: rgb(0, 0, 0) !important;
    background-image: none !important;
    color: rgb(0, 0, 0) !important;
    -webkit-tap-highlight-color:rgba(0,0,0,0) !important;
}

正常情况下直接写这段代码不写!important,如果项目不能生效,需要加!important。

以上是关于修改input框默认黄色背景的主要内容,如果未能解决你的问题,请参考以下文章

去掉谷歌input记住账号或密码时默认出现的黄色背景

chrome表单自动填充导致input文本框背景变成偏黄色问题解决

chrome表单自动填充导致input文本框背景变成偏黄色问题解决

Chrome表单文本框自动填充黄色背景色样式

怎么在列表里输入休,就显示黄色

点击input消除默认背景颜色