input form autofill chrome yellow background removed

Method a: Disable form autofill

<! - set the entire form -> 
< form AutoComplete = "OFF" > 
<! - separately provided a component -> 
< INPUT type = "text" AutoComplete = "OFF" >

 

Method two: by solid background shade cover

input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px white inset; -webkit-text-fill-color: #333; }

 

Method three: by setting the input style animation

<-! 99999s basically an infinitely long time
    By increasing the automatic extension of the background color fills the way, it is not a change of style user experience
-->
input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active {
        -webkit-transition-delay: 99999s;
        -webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
    }

 

Transfer: https: //blog.csdn.net/zhangdongxu999/article/details/73741390

Guess you like

Origin www.cnblogs.com/luocodes/p/12122696.html