i wanted to set the background color to transparent to my input when the browser autocomplete my form, currently looks like the image added, anyone know how to accomplish this?
I've tried this but it set to white and the borders are style with the yellow default, i want the color for the text to be white too.
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;
}
This is how it looks:
Thanks in advance :)
Finally i get the result with this piece of code:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000s ease-in-out 0s;
-webkit-text-fill-color: #fff !important;
}
use this to save your time
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-transition-delay: 9999s;
transition-delay: 9999s;
}
thanks martinezjc for the idea, but if we leave page opened for some time we will notice backround change
we can eliminate transition using css animation and forwards fill mode to make background color permanent
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-animation: autofill 0s forwards;
animation: autofill 0s forwards;
}
@keyframes autofill {
100% {
background: transparent;
color: inherit;
}
}
@-webkit-keyframes autofill {
100% {
background: transparent;
color: inherit;
}
}
just replace transparent with your color
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With