How to prevent Chrome from changing font when autofilling username/password?

前端 未结 5 1938
情书的邮戳
情书的邮戳 2020-11-30 04:50

I have a login form with username and password inputs. In Chrome on Windows (doesn\'t happen in other browsers or on a Mac), when hovering over a saved username from the Chr

5条回答
  •  情话喂你
    2020-11-30 05:26

    try this!

          &:-webkit-autofill::first-line,
          &:-webkit-autofill,
          &:-webkit-autofill:hover,
          &:-webkit-autofill:focus,
          &:-webkit-autofill:active {
            font-family: Times, "Times New Roman", serif !important;
          }
    

    you might only need this though

         &:-webkit-autofill::first-line
    

    the others are just incase

提交回复
热议问题