在 chrome 下,当 input 自动填充后, 会有一个默认的背景样式如下:
默认代码如下:
input:-internal-autofill-selected {
background-color: rgb(232, 240, 254) !important;
background-image: none !important;
color: rgb(0, 0, 0) !important;
}
解决办法:
给input添加样式box-shadow: inset 0 0 0 1000px #f3f3f3!important;