移动端安卓和ios的问题记录

1.微信端input框不能输入文字;

[contenteditable = "true"], input, textarea {
-webkit-user-select: auto!important;
-khtml-user-select: auto!important;
-moz-user-select: auto!important;
-ms-user-select: auto!important;
-o-user-select: auto!important;
user-select: auto!important;
}

2.ios键盘失去焦点不自动收起
$("body").on("touchend", function() { //body上面绑定touchend事件
$("input").each(function (i, v) { //自定义一个.input_box classname ,多个时绑定多个,遍历
if($(this).is(":focus") === true){ //如果当前input框获取到了焦点
$(this).blur();
}
});
});

3.ios软键盘弹起遮挡底部按钮
window.onresize = function () {
if (document.activeElement.tagName == "input" ) {
setTimeout(function () {
var top = document.activeElement.getBoundingClientRect().top;
window.scrollTo(0,top);
}, 0);
}
}

4.ios软键盘弹起fixed定位失效
<main style="height:100%;overflow-y: scroll;-webkit-overflow-scrolling: touch;position:absolute;">
  //页面内容

</main>
//定位的元素
<div class="write_comment">

</div>

5.ios层级定位失效

 z-index比较必须在同一父元素下进行比较,否则ios端会失效,安卓不会。








 

转载于:https://www.cnblogs.com/HONGYE1994/p/9103618.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值