I have design problem with Google Chrome and its form autofill function. If Chrome remembers some login/password it changes a background color to a yellow one.
Here are some screenshots:
How to remove that background or just disable this autofill ?
Try this code:
fareed namrouti answer is correct. But the background still get yellow when the input is selected. Adding
!important
fix the problem. If you want alsotextarea
andselect
with the same behavior just addtextarea:-webkit-autofill, select:-webkit-autofill
Only input
input, select, textarea
The final solution:
Here's the MooTools version of Jason's. Fixes it in Safari too.
If you want to preserve the autofill, as well as any data, attached handlers and functionality attached to your input elements, try this script:
It polls until it finds any autofill elements, clones them including data and events, then inserts them into the DOM in the same location and removes the original. It stops polling once it finds any to clone since the autofill sometimes takes a second after page load. This is a variation of a previous code sample, but more robust and keeps as much functionality intact as possible.
(Confirmed working in Chrome, Firefox and IE 8.)
If you guys want transparent input fields you can use transition and transition delay.