解决chrome自动填充白色背景(input:-internal-autofill-previewed)问题
129 字
1 分钟
解决chrome自动填充白色背景(input:-internal-autofill-previewed)问题
解决chrome自动填充白色背景(input:-internal-autofill-previewed)问题
使用background-clip属性,使它的值为 content-box(将背景裁剪到内容框),再设input的高度为0,最后使用padding将input框撑开即可:
input:-webkit-autofill { height: 0; border: 0; background-clip: content-box; padding: 12px 5px 12px 44px;}- 然而,有的项目在使用鼠标点选账号密码时依旧会出现灰色背景,最后的解决办法也是误打误撞,将background-clip的权重提到最高content-box!important就行,不会再出现灰色背景。
支持与分享
如果这篇文章对你有帮助,欢迎分享给更多人或打赏支持!
解决chrome自动填充白色背景(input:-internal-autofill-previewed)问题
https://gaodaxiu-blog.netlify.app/posts/解决chrome自动填充白色背景(input:-internal-autofill-previewed)问题/











