【发布时间】:2014-10-22 09:38:03
【问题描述】:
我有this web 的联系表格。有人知道如何防止 Chrome 使用“用户代理样式表”更改文本区域的背景颜色吗?
我有这个 CSS 样式表:
input[type=email] {
border: #e5e4e3 1px solid;
font-size: 14px;
padding: 4px;
background-color: #ffffff;
margin-top: 10px;
margin-bottom: 10px;
margin-left: 0px;
font-family: 'Abel', sans-serif;
color: #586d7a;
min-width: 491px;
height: 30px;
}
input[type=text]{
border:#e5e4e3 1px solid;
font-size: 14px;
padding: 4px;
background-color:#fff;
margin-top:10px;
margin-bottom:10px;
font-family: 'Abel', sans-serif;
color:#586d7a;
width:491px;
height:30px;
}
但是,一旦您在 Chrome 中完成该字段,它就会变成:
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background-color: rgb(250, 255, 189);
background-image: none;
color: rgb(0, 0, 0);
}
我使用了 Meyer Reset.css,但似乎并不能阻止这一点。 谢谢!
【问题讨论】:
标签: javascript php css forms google-chrome