# Chrome 自动填充
有时候,我们页面的主题色是深色的,在chrome浏览器里登录成功之后,会有个记住密码功能,这个功能是chrome自带的功能,然后我们下次登录的时候,就会提示让我们选择浏览器记住的账号和密码,选完之后会有个白色的背景,与我们自己写的风格很不搭配;
当然,这个也浏览器默认的颜色,我们是可以修改的;
# 解决方案
加上如下css,即可解决这个问题
:-webkit-autofill,
:-webkit-autofill:hover,
:-webkit-autofill:focus,
:-webkit-autofill:active {
// 回填文字颜色设置
-webkit-text-fill-color: #fff !important;
transition: background-color 5000s ease-in-out 0s;
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8