手機底部div被輸入法頂上去解決辦法

CSS樣式:ide

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

js操做flex

<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>
相關文章
相關標籤/搜索