笔者用的antd需求是要输入框背景色 但是碰见自动填入时背景色默认白色 需要改成透明 代码如下
//浏览器自动填入表单样式设置
.ant-input:-webkit-autofill {
//去掉默认背景色 9999999999s 基本上就是一个无限长的时间 通过延长增加自动填充背景色的方式, 是用户感受不到样式的变化
transition: background-color 9999999999s ease-in-out 0s;
/*覆盖背景颜色*/
// -webkit-box-shadow: 0 0 0 1000px transparent inset;
/*字体颜色重置*/
-webkit-text-fill-color: white;
}
//为input设置透明色
.ant-input {
color: white;
background-color: rgba(255, 255, 255, 0);
}