Removing input background colour for Chrome autocomplete?

前端 未结 30 1945
失恋的感觉
失恋的感觉 2020-11-22 04:02

On a form I\'m working on, Chrome is auto-filling the email and password fields. This is fine, however, Chrome changes the background colour to a pale yellow colour.

30条回答
  •  囚心锁ツ
    2020-11-22 04:12

    try this for hide autofill style

    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:active,
    input:-webkit-autofill:focus {
        background-color: #FFFFFF !important;
        color: #555 !important;
        -webkit-box-shadow: 0 0 0 1000px white inset !important;
        -webkit-text-fill-color: #555555 !important;
        }
    

提交回复
热议问题