【问题标题】:Form Style in Chrome [duplicate]Chrome中的表单样式[重复]
【发布时间】: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


    【解决方案1】:

    解决办法:

    输入:-webkit-autofill,文本区域:-webkit-autofill, 选择:-webkit-autofill { 背景颜色:#FFF; -webkit-box-shadow: 0 0 0px 1000px 白色插图; }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-15
      • 1970-01-01
      • 2015-10-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多