安卓手机,软键盘把底部div顶上去解决方案:

<script>
    //点击输入数字
    window.onresize = function () {
        var h = $(window).height();
        var u = navigator.userAgent;
        if ( u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
            if(h <= window.screen.availHeight/2){
                document.getElementById('toNav').style.position = 'relative';
            }else{
                document.getElementById('toNav').style.position = 'fixed';
            }
        }
    };
</script>

 注:底部div的ID是“toNav”

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-06-03
  • 2022-12-23
  • 2021-10-11
猜你喜欢
  • 2022-12-23
  • 2021-07-09
  • 2021-10-21
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案