2016-10-04 52 views
0

我有一個表單,我保存了我的登錄憑證。現在,Chrome向輸入字段顯示自己的背景顏色。
我做過這方面的研究,但沒有找到任何東西。
有沒有什麼辦法可以覆蓋僅來自chrome的用戶代理樣式表?我們如何覆蓋用戶代理樣式表?

+1

[谷歌瀏覽器表單自動填充和黃色背景]的可能的複製(HTTP:/ /stackoverflow.com/questions/2920306/google-chrome-form-autofill-and-its-yellow-background) – CBroe

回答

0

是可以改變的樣式,像這樣:

/* Change Autocomplete styles in Chrome*/ 
input:-webkit-autofill, 
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus 
input:-webkit-autofill, 
textarea:-webkit-autofill, 
textarea:-webkit-autofill:hover 
textarea:-webkit-autofill:focus, 
select:-webkit-autofill, 
select:-webkit-autofill:hover, 
select:-webkit-autofill:focus { 
    border: 1px solid green; 
    -webkit-text-fill-color: green; 
    -webkit-box-shadow: 0 0 0px 1000px #000 inset; 
    transition: background-color 5000s ease-in-out 0s; 
} 

按照文章的詳細信息: https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/

+0

謝謝Bartek。 :) 這個對我有用.. –