input框颜色怎么改都不起作用,发现是用户代理样式表的东西自动填充了
input:-internal-autofill-selected {
appearance: menulist-button;
background-image: none !important;
background-color: -internal-light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important;
color: -internal-light-dark(black, white) !important;
}
解决办法:添加如下样式将背景色改为透明
input:-internal-autofill-previewed, input:-internal-autofill-selected {
-webkit-text-fill-color: #FFFFFF !important;
transition: background-color 5000s ease-in-out 0s !important;
}