为了账号安全,请及时绑定邮箱和手机立即绑定

Google Chrome表单自动填充及其黄色背景

Google Chrome表单自动填充及其黄色背景

哆啦的时光机 2019-07-23 18:46:15
Google Chrome表单自动填充及其黄色背景我对Google Chrome及其表单自动填充功能存在设计问题。如果Chrome记住某些登录名/密码,则会将背景颜色更改为黄色。以下是一些截图:如何删除该背景或只是禁用此自动填充?
查看完整描述

3 回答

?
素胚勾勒不出你

TA贡献1827条经验 获得超9个赞

将“白色”更改为您想要的任何颜色。

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;}


查看完整回答
反对 回复 2019-07-23
?
牧羊人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;}


查看完整回答
反对 回复 2019-07-23
?
温温酱

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);
        });
    });}


查看完整回答
反对 回复 2019-07-23
  • 3 回答
  • 0 关注
  • 604 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信