Google Chrome表单自动填充及其黄色背景我对Google Chrome及其表单自动填充功能存在设计问题。如果Chrome记住某些登录名/密码,则会将背景颜色更改为黄色。以下是一些截图:如何删除该背景或只是禁用此自动填充?
3 回答
素胚勾勒不出你
TA贡献1827条经验 获得超9个赞
将“白色”更改为您想要的任何颜色。
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset !important;}
牧羊人nacy
TA贡献1862条经验 获得超7个赞
如果你们想要透明的输入字段,你可以使用转换和转换延迟。
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active {
-webkit-transition-delay: 9999s;
-webkit-transition: color 9999s ease-out, background-color 9999s ease-out;}
温温酱
TA贡献1752条经验 获得超4个赞
解决方案在这里:
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
$(window).load(function(){
$('input:-webkit-autofill').each(function(){
var text = $(this).val();
var name = $(this).attr('name');
$(this).after(this.outerHTML).remove();
$('input[name=' + name + ']').val(text);
});
});}- 3 回答
- 0 关注
- 642 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消
