首页 > 移动平台 > 详细

手机底部div被输入法顶上去解决办法

时间:2019-09-09 12:22:44      阅读:350      评论:0      收藏:0      [点我收藏+]

CSS样式:

 .add-not-examine-content-bottom{
            height: 1rem;
            display: flex;
            font-family: MicrosoftYaHei;
            font-size: .36rem;
            position: fixed;  //必须是fixed
            bottom: 0;
            width: 100%;
        }

js操作

<script>
    //解决输入法问题
    $(function () {
        var oHeight = $(document).height(); //当前的高度
        $(window).resize(function () {
            if ($(document).height() < oHeight) {
                $(‘.add-not-examine-content-bottom‘).hide();
            } else {
                $(‘.add-not-examine-content-bottom‘).show();
            }
        });
    });
</script>

 

手机底部div被输入法顶上去解决办法

原文:https://www.cnblogs.com/wanlibingfeng/p/11490444.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!