如何更改:-webkit-autofill的样式? [英] How to change the style of :-webkit-autofill?
本文介绍了如何更改:-webkit-autofill的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
:-webkit-autofill
的默认背景颜色是橙色.如何更改?
The default background-color of the :-webkit-autofill
is orange. How to change it?
:-webkit-autofill, input:-webkit-autofill {
background-color: #fff !important;
}
上面的代码不起作用.
推荐答案
不是 background-color
消除了黄色/橙色,而是 box-shadow
:
It's not background-color
that gets rid of that yellow/orange, it's the box-shadow
:
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 100px #fff inset;
-moz-box-shadow: 0 0 0 100px #fff inset;
box-shadow: 0 0 0 100px #fff inset;
}
这篇关于如何更改:-webkit-autofill的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文