Chrome browser input turns yellow

Source: Internet
Author: User

When the Chrome form is automatically populated, the background of the input text box turns yellow, because chrome defaults to the AutoFill input form plus the Input:-webkit-autofill private property, which fills the following style:

Input:-webkit-autofill {

background-color: #FAFFBD;

Background-image:none;

Color: #000;

}

See a lot of information: there are two solutions, temporarily

First: for solid color backgrounds

Input:-webkit-autofill {
-webkit-box-shadow:0 0 0px 1000px white inset;
border:1px solid #CCC!important;
}

The second type: a background map

Input:-webkit-autofill
 {-webkit-animation:autofill-fix 1s infinite;} 
@-webkit-keyframes autofill-fix 
{from 
{background-color:transparent} to 
{background-color: Transparent}
 }

This means that the color will always be transparent to transparent for looping animations.

Some people say: the auto-fill function of the form is closed directly on the form label: autocomplete= "Off". The test is invalid, probably the browser upgrade, in short, there is no effect. This is probably all, master advice please leave a comment.


 

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.