The Google Chrome login page remembers the password and the next login is automatically populated with a yellow background.
Google Chrome is set up as follows:
Input:-webkit-autofill, Textarea:-webkit-autofill, select:-webkit-autofill {
- background-color: < Span class= "value" > rgb (+, 255, 189);
- background-image: < Span class= "value" >none;
- c Olor: rgb (0, 0, 0);
Remove the yellow background the first way is to override the style and use!important to elevate the priority, except that the chrome default definition of Background-color,background-image,color is not available! Important to elevate its priority, other properties can use!important to elevate its priority.
- Input:-webkit-autofill {
- -webkit-box-shadow: 0 0 0px 1000px white inset; Use a large enough solid color inner shadow to cover the yellow background
- Border: 1px solid #CCC!important;
- }
Try the above method, if there is a picture in input, the previous icon will be masked together.
The second method uses jquery to determine if it is a Google browser and then traverse that element, by taking a value, attaching, removing the implementation:
$ (function () {
if (Navigator.userAgent.toLowerCase (). IndexOf ("Chrome") >= 0) {
$ (window). Load (function () {
$ (' Input:not (Input[type=submit]) '). each (function () {
var outhtml = this.outerhtml;
$ (this). Append (outhtml);
});
});
}
});
Remove the default yellow background from the Google Chrome input box