[Tencent/weui]底部(weui-footer)版权申明浮动异常

2024-07-02 625 views
4

weui-footer weui-footer_fixed-bottom 使用的时候,如果页面带有输入框,安卓上会导致底部版权申明上移,影响,IOS提交时出现浮动在页面中央。 _20171108110548

回答

4

官方的展示页 weui.io 貌似也有这个问题

1

我也遇到这个问题啊!!

安卓机上点到文本框处弹出输入法,固定在底部的页脚就会上浮到输入法界面上方。。。

为什么官方都不解决呢?

3

没办法,只能通过输入框获取焦点隐藏底部,失去焦点的时候展示底部,那就这样吧... $('input').on('focus',function(){ $('.page__ft').hide(); }); $('input').on('blur',function(){ $('.page__ft').show(); });

5

您好,这里给出一个简单的demo,可以改成这样实现,因为要涉及到body的改动,所以weui并没有采取这种方式。

<body>
  <div class="container">
    <div class="content">
      I am content.
    </div>

    <p class="bottom-tips">I am bottom tips.</p>
  </div>
</body>
html,
body {
  height: 100%;
}
.container {
  min-height: 100%;
  position: relative;
  box-sizing: border-box;
  padding-bottom:  30px;
}
.bottom-tips {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}