以登錄頁面爲例ui設計圖效果如下圖:
進入登錄頁面cookie自動填充帳號密碼之後input輸入框出現了背景色:
解決方法:主要代碼就是加個陰影去掉背景色
input:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill {
-webkit-text-fill-color: #ededed !important;
-webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
background-color:transparent;
background-image: none;
transition: background-color 50000s ease-in-out 0s; //背景色透明 生效時長 過渡效果 啓用時延遲的時間
}