input自動填充瀏覽器記住的密碼后,去除輸入框背景顏色


谷歌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; //背景色透明 生效時長 過渡效果 啟用時延遲的時間
}
}

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM