border: none;
padding:0
outline: none;
1.給input設置內置陰影,至少要比你的input自己大。不過,box-shadow是很慢的,適當大小。並且,若是你的input是用圖片作背景的話,是沒有辦法作這麼幹的。設置transparent也不能夠。web
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px white inset; //經過內陰影覆蓋默認黃色背景 -webkit-text-fill-color: #333; //去除默認黑色字色 }
2.關閉自動補全spa
<input type="text" autocomplete="off">
3.設置背景變換過渡,可短期內保持本來背景(支持透明)code
transition: background-color 5000s ease-in-out 0s;
input::-webkit-input-placeholder{color:rgba(0,0,0,0.3);} input::-moz-input-placeholder{color:rgba(0,0,0,0.3);} input::-ms-input-placeholder{color:rgba(0,0,0,0.3);} input::-o-input-placeholder{color:rgba(0,0,0,0.3);}