zoukankan      html  css  js  c++  java
  • 解决谷歌浏览器记住密码后输入框背景变成黄色问题

    在css中加入如下代码,让浏览器颜色过5000秒后再变

    :-webkit-autofill {
      -webkit-text-fill-color: #fff !important;
      transition: background-color 5000s ease-in-out 0s;
    }

    正常情况下按上述方法即可解决,如果还是不能解决

    可在head标签中加入如下代码,彻底解决

    <script type="text/javascript">
            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);
                    });
                });
            }
    </script>
    文末小福利免费视频资源网站(搜索猴):www.sousuohou.com
  • 相关阅读:
    Linux文件权限
    Linux命令
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
  • 原文地址:https://www.cnblogs.com/vicF/p/9867089.html
Copyright © 2011-2022 走看看