如何在Chrome自动完成功能上删除蓝色背景 [英] how to remove blue background on chrome autocomplete
本文介绍了如何在Chrome自动完成功能上删除蓝色背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在制作一个表单,希望每个输入都具有透明性,但是当我在Chrome中使用自动完成功能,然后使用Tab键进入下一个字段时,上一个字段会变成浅蓝色背景.
I am making a form and want each input to have be transparent but when I use the autocomplete feature in Chrome and then tab into the next field, the previous field gets a pale blue background.
我尝试使用:
input:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0 30px white inset !important;
transition: background-color 5000s ease-in-out 0s;
}
但这是行不通的.我不希望白色背景,但我希望在单击另一个输入并将color
设置为transparent
时也不起作用.
but this doesn't work. I don't want a white background I want it remain transparent when clicking into another input and setting the color
to transparent
doesn't work either.
如何实现?
推荐答案
Google似乎通过shadow属性做了一些魔术.这使它对我有用:
Google seems to have done some magic with the shadow property. This made it work for me:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus textarea:-webkit-autofill,
textarea:-webkit-autofill:hover textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}
这篇关于如何在Chrome自动完成功能上删除蓝色背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文