当改变了Input输入框的背景颜色之后,并且浏览器记住了密码,那么浏览器自带的Input输入框的背景就出来了
解决方案一:
.ant-input-affix-wrapper {
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 2px;
background: rgb(90, 90, 90);
.ant-input {
background: transparent; // 背景色透明(重点)
color: white;
}
}
// 重点
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-transition-delay: 111111s;
-webkit-transition: color 11111s ease-out,
background-color 111111s ease-out;
}
解决方案二:去掉自动填充功能
<input type="text" autocomplete="off">