在谷歌浏览器中使自动完成输入透明

问题描述:

在阅读之前,请注意这不是一个复制,为什么?因为答案从来没有好的答案,我们需要的答案。在谷歌浏览器中使自动完成输入透明

所以,我们基本上想要做的,就是让一个输入透明的,就像这样:

A example of transparent background in a input

这是美丽的,不是吗?好了,现在看看这个:

A not beautiful input at all

这只是看...太可怕了。 有没有办法解决这个问题?

如下的东西不起作用:

input:-webkit-autofill { 
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.3) inset; 
    -webkit-text-fill-color: #EEEEEE !important; 
} 

的想法?

+0

背景颜色:透明,你可以做一个小提琴 –

+0

对不起,这些东西不适用于浏览器特定的选择器 –

+0

我喜欢这个问题的解决方案由杰森http://stackoverflow.com/questions/2920306/google-chrome-form-autofill-and-its-yellow-background – user2867288

这是WebKit的自动填充

input:-webkit-autofill { 
    -webkit-box-shadow:0 0 0 50px white inset; 
} 

改变白到任何你想要的。

而且 - 如果你想改变文字颜色是:

-webkit-text-fill-color: yourColor !important; 

如果你不想使用此解决方案,您可以使用类似这样

input { 
    background-color: red !important; 
} 

看到这里全信息 - http://labs.enonic.com/articles/remove-forced-yellow-input-background-in-chrome

但大多数建议是使用

input:-webkit-autofill { 
-webkit-box-shadow:0 0 0 50px white inset; 
} 
+0

你好,我没有把这个问题标记为OK,因为它没有使输入透明:) –

+0

@TijlVandenBrugghen输入:-webkit-autofill {color:rgba (255,255,255,0.3)!重要; } – ajmajmajma