61,124
社区成员
发帖
与我相关
我的任务
分享$(function() {
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
$(window).load(function(){
$('ul input:not(input[type=submit])').each(function(){
var outHtml = this.outerHTML;
$(this).append(outHtml);
});
});
}
});这段代码,可这段代码我也放上去了,还是没效果(这里也想附带问下各位大神其他人能实现的原理是什么)xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>滚动到顶部,锁定</title>
</head>
<body>
<style type="text/css">
.text1{
position: absolute;
left: 0;
right: 0;
border: solid 1px blue;
background-color: red;
}
.text2{
position: absolute;
left: 0;
right: 0;
background-color: red;
border: solid 1px red;
pointer-events: none;
}
</style>
<input class="text1" type="text" onfocus="text1focus()" onblur="text1change()" name="name" >
<input class="text2" type="text">
<script>
var text1 = document.getElementsByTagName('input')[0];
var text2 = document.getElementsByTagName('input')[1];
var text1change = function(){
text2.value = text1.value;
text2.style.display = '';
}
var text1focus = function(){
console.log('focus');
text2.style.display = 'none';
}
</script>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
猥琐方案你这个方法我用过,这个只不过是把黄色的底纹改成了白色,把我的背景图片给遮挡了 [quote=引用 3 楼 abc395015721 的回复:] [quote=引用 2 楼 jikeytang 的回复:]input:- webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; }
你这个方法我用过,这个只不过是把黄色的底纹改成了白色,把我的背景图片给遮挡了 [quote=引用 2 楼 jikeytang 的回复:]input:- webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; }
你这个方法我用过,这个只不过是把黄色的底纹改成了白色,把我的背景图片给遮挡了 input:- webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; }
autoComplete 谷歌下是识别的,所以这个方案可行,虽然你用的不是html5,你只要针对chrome解决就好了,其他浏览器下没有背景黄色的问题
input:- webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; }
input:- webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; }