小编Jac*_*ack的帖子

Google Chrome、Edge - 自动填充 - 无法覆盖自动填充字体大小

当输入在镶边和边缘中自动填充时,我很难设置输入字体大小。我能够获得所需的颜色和边框,但不能获得字体大小。行高似乎也更改为所需字体大小的值。当我单击页面内容时,会应用正确的字体大小。令人惊讶的是,在 Firefox 中一切都工作正常。

Chrome版本:97.0.4692.71

边缘版本:96.0.1054.62

火狐版本:95.0.2

我目前正在使用 CSS 规则来实现这一目标:

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border: 1px solid green;
  -webkit-text-fill-color: green;
  font-size: 24px !important;
} 
Run Code Online (Sandbox Code Playgroud)

谢谢!

css google-chrome autofill

5
推荐指数
0
解决办法
1231
查看次数

标签 统计

autofill ×1

css ×1

google-chrome ×1