var winHeight = $(window).height(); //获取当前页面高度
$(window).resize(function () {
var thisHeight = $(this).height();
if ( winHeight - thisHeight > 140 ) {
//键盘弹出
$('.footer').css('position','static');
} else {
//键盘收起
$('.footer').css({'position':'fixed','bottom':'0'});
}
})
——现在的努力,只为小时候吹过的牛逼! ——
Original: https://www.cnblogs.com/zxf100/p/15749509.html
Author: 下页、再停留
Title: Jq 手机端输入框防止底部菜单被小键盘弹起
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/583366/
转载文章受原作者版权保护。转载请注明原作者出处!