Reputation: 1
I notice, at least in Chrome, when Autofill puts data into a textbox, the background-color changes to a shade of yellow, is there a way in CSS to override this? I've tried input:active, input:focus and even input:hover but none have worked
Upvotes: 0
Views: 1237
Reputation:
You can use this:
input:-webkit-autofill {
-webkit-box-shadow:0 0 0 50px white inset; /* Change the color to your own background color */
-webkit-text-fill-color: #333;
}
input:-webkit-autofill:focus {
-webkit-box-shadow: /*your box-shadow*/,0 0 0 50px white inset;
-webkit-text-fill-color: #333;
}
Upvotes: 1