【发布时间】:2019-03-19 00:41:30
【问题描述】:
我正在创建一个表单,一旦提交,我想删除输入的背景颜色。
如果我对输入使用 Google 自动填充,则会忽略背景颜色和颜色属性。
在开发工具中,它显示我的样式应该可见,但它们不可见。
input:disabled, textarea:disabled, .disabled {
background: #060301;
color: #f0eef3;
}
/* Annoyingly we have to override Chrome styles */
input:-webkit-autofill:disabled,
textarea:-webkit-autofill:disabled,
input:-internal-autofill-selected {
background: #060301!important;
color: #f0eef3!important;
}
除非使用自动填充,否则它工作正常。
有什么想法吗?
【问题讨论】:
标签: css