使用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
会导致失败。
我有什么明显的遗失吗?