Removing input background colour for Chrome autocomplete?

前端 未结 30 2372
失恋的感觉
失恋的感觉 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:32

    Adding one hour delay would pause any css changes on the input element.
    This is more better rather than adding transition animation or inner shadow.

    input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill{
      transition-delay: 3600s;
    }
    

提交回复
热议问题