手机底部div被输入法顶上去解决办法
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>