视频加载失败

解决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)问题/
作者
GaoDaXiu
发布于
2019-09-09
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
GaoDaXiu
Hello, I'm GaoDaXiu.
公告
欢迎来到我的博客!
分类
标签
最新动态
站点统计
文章
76
分类
20
标签
128
总字数
72,109
运行时长
0 天
最后活动
0 天前
站点信息
构建平台
Netlify CI
博客版本
Firefly v6.16.8
文章许可
CC BY-NC-SA 4.0
文章目录