Home > Web Front-end > JS Tutorial > body text

How to deal with the yellow background of input after the browser remembers the password

小云云
Release: 2017-12-18 14:08:12
Original
2894 people have browsed it

This article wants to share with you a small function, that is, use the Chrome browser to select the account that remembers the password. The input box will automatically add a yellow background. Some design input boxes have a transparent background, and this yellow needs to be removed. background. Let me share with you how to deal with the yellow background of the input after the Chrome browser remembers the password. Let’s take a look. I hope it can help you.

Use the Chrome browser to select the account that remembers the password, and the input box will automatically add a yellow background. Some design input boxes have a transparent background, and this yellow background needs to be removed;

Method 1: Shadow coverage

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
}
Copy after login

Because it is setting the color coverage , so it is only effective for non-transparent solid color backgrounds;

Method 2: Modify the time when the chrome browser renders the yellow background

:-webkit-autofill {
 -webkit-text-fill-color: #fff !important;
 transition: background-color 5000s ease-in-out 0s;
}
Copy after login

Perfect solution

How about everyone learn it? Hurry up and give it a try.

Related recommendations:

Examples of how to control the input input format in html

For the input box, the input value is limited to float Point-type js method

javascript input input box fuzzy prompt function detailed explanation

The above is the detailed content of How to deal with the yellow background of input after the browser remembers the password. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!