输入中的.class前缀:-webkit-autofill不受尊重

时间:2016-10-25 10:39:51

标签: css css3 css-selectors

使用Removing input background colour for Chrome autocomplete?的答案我想禁用自动填充背景颜色,但仅限于特定表格。

.myform input:-webkit-autofill,
.myform input:-webkit-autofill:focus {
    -webkit-transition: color 9999s ease-out, background-color 9999s ease-out;
    -webkit-transition-delay: 9999s;
}

HTML:

<form class="myform" method="POST" action="targetpage.aspx">
    <input type="text" name="Username">
    <input type="password" name="Password">
</form>

但上述内容并未得到尊重(例如在Chrome中)。 添加.myform会导致失败。 我有什么明显的遗失吗?

0 个答案:

没有答案