chorme 瀏覽器記住密碼後input黃色背景處理方法(兩種)

使用chrome瀏覽器選擇記住密碼的帳號,輸入框會自動加上黃色的背景,有些設計輸入框是透明背景的,須要去除掉這個黃色的背景;css

方法1:陰影覆蓋web

input:-webkit-autofill {
   -webkit-box-shadow: 0 0 0 1000px white inset !important;
}
   

因爲是設置顏色覆蓋,因此只對非透明的純色背景有效chrome

方法2:修改chrome瀏覽器渲染黃色背景的時間瀏覽器

:-webkit-autofill {
  -webkit-text-fill-color: #fff !important;
  transition: background-color 5000s ease- in -out 0s;
}
   

完美解決spa

 

 

二、input 獲取焦點後,清除默認藍色邊框,添加css屬性設計

outline:none;code

相關文章
相關標籤/搜索