瀏覽器自帶記憶功能,使input顏色和字體丟失


方法一 : 會有視覺上顏色的變化
input:-internal-autofill-selected { /*內置陰影填充 背景顏色*/ box-shadow: inset 0 0 0 1000px #253167! important; /*只有谷歌兼容 字體顏色*/ -webkit-text-fill-color: #fff !important; }

上述可以解決,,
方法二 : 
可以禁用 input的記憶功能
<input type="text"  autocomplete="off">,

方法三
自動填充無限 放慢填充的時間,,感知不到顏色的變化
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-transition-delay: 99999s;
-webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
}


 


免責聲明!

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



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