移动端的文本框获取焦点时导致fixed或absolute定位的按钮被手机键盘顶上去的问题
var win_h = $(window).height();//关键代码 window.addEventListener('resize', function () { if($(window).height() < win_h){ $('.share-btn-box').hide(); }else{ $('.share-btn-box').show(); } });
var win_h = $(window).height();//关键代码 window.addEventListener('resize', function () { if($(window).height() < win_h){ $('.share-btn-box').hide(); }else{ $('.share-btn-box').show(); } });