Remove the default yellow background when Google input remembers the account or password

Source: Internet
Author: User

In Google Chrome will default to remember the account number, and remember the account after its input background will turn yellow, the solution is as follows:

Method One: Directly with the CSS inner shadow to cover the yellow, the code is as follows:

{ -webkit-box-shadow: 0 0 0px 1000px white inset

Method Two: The Input text box uses the picture background

This is more troublesome, there is no perfect solution, there are two options:
1, if your picture background is not too complex, only some simple inner shadow, the person feel that can use the method described above with a large enough solid color inside the shadow to cover the yellow background, at this time is just not the original effect of the inner shadow.
2, if you really want to retain the original inner shadow effect, it can only sacrifice chrome auto-fill the function of the form, using JS to implement, for example:

$ (functionif (Navigator.userAgent.toLowerCase (). IndexOf ("Chrome") >= 0) {$ ( window). Load (function() {$ (' ul Input:not (Input[type=submit]) '). each (function   var. outerHTML; $ ( This

The traversed object may have to be adjusted to your needs. If you do not want to use JS, OK, on the form label directly closed the form's AutoFill function: autocomplete= "off".

Remove the default yellow background when Google input remembers the account or password

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.