删除新的Firefox自动填充颜色 [英] Remove new Firefox autofill color
问题描述
几天前,我的Firefox开发人员版更新为版本67.0b2(64位).从那时起,在每个网站上,所有自动填充的输入字段的背景均为黄色.
A few days ago my Firefox Developer Edition updated to version 67.0b2 (64 bit). Since then all autofilled input fields have a yellow background, on literally every website.
如何摆脱黄色的自动填充颜色?
How can I get rid of the yellow autofill color?
更改插入框阴影的颜色似乎不像在Chrome中那样.
Changing inset box-shadow color doesn't seem to work like it does in Chrome.
推荐答案
经过几个不眠之夜,我终于想出了摆脱自动填充颜色的方法!
这真的很简单,您所要做的就是将其添加到CSS中:
After few sleepless nights I've finally figured out how to get rid of the autofill colors!
It's really simple, all you have to do is to add this to your css:
input {
filter: none;
}
这是因为在view-source:resource://gre-resources/forms.css
的底部可以看到以下内容:
It's because at the bottom of view-source:resource://gre-resources/forms.css
we can see this:
:-moz-autofill, :-moz-autofill-preview {
filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%);
}
基本上会弄乱您的颜色.我不确定这是否是版本67.0b2
中的新功能,但是很高兴知道它在那里.
编辑:该修补程序适用于所有67.0或更高版本的Firefox浏览器.
如果您正在寻找针对Firefox的全局修补程序,而不仅仅是正在创建的网站,并且您不知道如何在Firefox的CSS中添加内容,那么请看此处
Which basically messes up your colors. I'm not sure if this is new in version 67.0b2
but it's nice to know it's there.
This fix works for every Firefox browser with version 67.0 or higher.
EDIT 2: If you are looking for global fix for your Firefox, not just for your website you're creating, and you don't know how to add something to your Firefox's CSS then have a look here
这篇关于删除新的Firefox自动填充颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!