Clear input autofill background color

The automatic filling background color of the HTML input box input tag can be canceled by modifying the CSS autofill pseudo-class, and the automatic filling font color can be set through the CSS text-fill-color attribute.

Take Google Chrome as an example:

input:-webkit-autofill {

        transition: background-color 5000s ease-in-out 0s;

}

In addition, CSS also supports changing the font color of the auto-fill input box after auto-filling. The setting method is as follows:

input {

        -webkit-text-fill-color: #0c3ce9; //The color is set to the color you need

Guess you like

Origin blog.csdn.net/cdd9527/article/details/128381036