input修改自动填充背景色

填充之前:

 填充之后:(自带填充背景色)

解决方法

通过控制台查找原因,发现一些原因,修改后只修改了部分样式
在这里插入图片描述

修改为透明的方式:

.ant-input:-webkit-autofill {
  box-shadow: 0 0 0px 1000px transparent inset !important;
}

调整输入框字体的颜色

.ant-input:-internal-autofill-previewed {
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s !important;
}
.ant-input:-internal-autofill-selected {
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

修改完,再次填充:

 交流


1、QQ群:可添加qq群共同进阶学习: 进军全栈工程师疑难解  群号:   856402057

2、公众号:公众号「进军全栈攻城狮」 ,对前端技术保持学习爱好者。我会经常分享自己所学所看的干货,在进阶的路上,共勉!

猜你喜欢

转载自blog.csdn.net/weixin_42333548/article/details/125505178