Css 在处理平板电脑和其他东西时要小心,如果没有大纲,默认的Android浏览器有点难以使用。虽然很容易应用于非移动浏览器:)一个小小的改进:input[type=text],input[type=password],input[type=email],text

Css 在处理平板电脑和其他东西时要小心,如果没有大纲,默认的Android浏览器有点难以使用。虽然很容易应用于非移动浏览器:)一个小小的改进:input[type=text],input[type=password],input[type=email],text,css,validation,google-chrome,html-input,Css,Validation,Google Chrome,Html Input,在处理平板电脑和其他东西时要小心,如果没有大纲,默认的Android浏览器有点难以使用。虽然很容易应用于非移动浏览器:)一个小小的改进:input[type=text],input[type=password],input[type=email],textarea,选择{outline:none;}谢谢你的提示!但是,在发布表单后,单击“上一步”按钮,黄色突出显示又出现了。我已经扩展了您的代码片段(请参见我的答案)以涵盖这一点。+1@Benjamin不错的解决方案,它会闪烁一点黄色,但最后会修复


在处理平板电脑和其他东西时要小心,如果没有大纲,默认的Android浏览器有点难以使用。虽然很容易应用于非移动浏览器:)一个小小的改进:
input[type=text],input[type=password],input[type=email],textarea,选择{outline:none;}
谢谢你的提示!但是,在发布表单后,单击“上一步”按钮,黄色突出显示又出现了。我已经扩展了您的代码片段(请参见我的答案)以涵盖这一点。+1@Benjamin不错的解决方案,它会闪烁一点黄色,但最后会修复;)这是一个伟大的黑客。ThanksI也会添加焦点:D
input:-webkit autofill,input:focus:-webkit autofill{-webkit-box shadow:0 0px 1000px 35; FFF inset;}
hi@JStormThaKid,我使用了这个…,但没有正确的输入。。。请回答这个…谢谢你回答他实际提出的问题!我几乎开始失去希望。最好的答案是,我仍然想要谷歌自动完成,所以谢谢
<input type="text" name="name" autocomplete="off">
<form autocomplete="off" ...>
input[type="text"], input[type="password"], textarea, select { 
    outline: none;
}
:focus { background-color: #fff; }
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);
    });
});}
if (BrowserDetect.browser == "Chrome") {
  jQuery('form').attr('autocomplete','off');
};
input:focus { outline:none; }
textarea:focus { outline:none; }
input:focus { outline:#HEXCOD SOLID 2px ; }
if ($.browser.webkit) {
    $("input").attr('autocomplete','off');
}
<script type="text/javascript">
    $(function() {
        if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
        var intervalId = 0;
            $(window).load(function() {
                intervalId = setInterval(function () { // << somehow  this does the trick!
                    if ($('input:-webkit-autofill').length > 0) {
                        clearInterval(intervalId);
                        $('input:-webkit-autofill').each(function () {
                            var text = $(this).val();
                            var name = $(this).attr('name');
                            $(this).after(this.outerHTML).remove();
                            $('input[name=' + name + ']').val(text);
                        });
                    }
                }, 1);
            });
        }
    });
</script>
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
    $(document).ready(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);
        });
    });
};
// Just change "red" to any color
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px red inset;
}
<input readonly="readonly" onfocus="this.removeAttribute('readonly');" />