移动端解决fixed和input获取焦点软键盘弹出影响定位的问题

$("#area").bind('focus',function(){
                    var winHeight = $(window).height();
                    $(window).resize(function(){
                        var thisHeight = $(this).height();
                        if(winHeight - thisHeight > 50 ){
                            $('.submit-btn').hide();
                        }else{
                            $('.submit-btn').show();
                        }
                    })
                })

猜你喜欢

转载自www.cnblogs.com/mxr1129/p/9083587.html