小编Grz*_* T.的帖子

自动完成输入样式不正确;

我有自动完成表格。我的问题是,有时在表单输入(字体大小)中未设置样式。要重现我的情况,您需要表格并自动完成:

  1. 填写电子邮件和密码;
  2. 点击浏览器地址输入右侧的按键图标保存表格;
  3. 提交表格;
  4. 重新加载页面。

有时,只有当我单击页面上的任何位置时,页面才会为输入集加载自动完成的数据样式;

在Google Chrome版本75.0.3770.142(官方内部版本)(64位)中,这种情况很少发生。大约有25%的情况。但是这个问题在Chrome的Beta版中很好看-版本77.0.3861.0(正式版本)金丝雀(64位)-100%的情况。

我试过了:

  • 内联样式
  • 重要的样式,
  • 伪选择器(输入:-webkit-autofill,输入:-webkit-autofill:hover,输入:-webkit-autofill:focus)

设置输入字体大小无济于事。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .input {
            font-size: 24px;
        }
    </style>
</head>
<body>
<form action="#">
    <input type="text" placeholder="Email" class="input" id="email">
    <br>
    <input type="password" placeholder="Password" class="input">
    <br>
    <button type="submit">Submit</button>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

预期结果:

实际结果

html css styles google-chrome

7
推荐指数
1
解决办法
153
查看次数

标签 统计

css ×1

google-chrome ×1

html ×1

styles ×1