谷歌chrome瀏覽器在用戶登錄記住密碼之后通常會改變input框的背景色
input CSS樣式
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; //背景色透明 生效時長 過渡效果 啟用時延遲的時間 } input { background-color:transparent; }
input scss樣式
input { background-color:transparent; border: 0px; -webkit-appearance: none; border-radius: 0px; padding: 12px 5px 12px 15px; color: $bg; height: 47px; // caret-color: $cursor; &:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill { -webkit-text-fill-color: $bg !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; //背景色透明 生效時長 過渡效果 啟用時延遲的時間 } }