安卓系统下的页面底部input会被虚拟键盘挡住,怎么办??
发布于 5 年前 作者 maming 8720 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

如题 ,安卓手机中,fixed在页面底部的 输入框 ,获取焦点后弹出的虚拟键盘把 输入框挡住了,用了cursor-spacing=‘76’ 有时候好用 有时候不好用,然后好像不同的 安卓手机也 不能都适配,怎么办,求解,动态获取键盘高度,第一次获取焦点时没作用,而且也比实际键盘高度也高。。。看了好多人也有这个困惑,求解。 -------wxml---------

发送

-----------wxss-------- page{  background: #EBEBEB; } .in_mes_wrap{  display: flex;  justify-content: space-around;  align-items: center;  height: 100rpx;  background: #F5F4F6; position: fixed;  bottom: 0;  width: 100%; } .inmes_inp{  border: 2rpx solid #DDDDDD;  width: 70%; border-radius: 15rpx; background: #fff; height: 70rpx; margin: 15rpx; padding-left: 15rpx; } .mes_wrap{

} .send_but{  background: #36A6F2;  /* width: 30rpx; */  height: 70rpx;  color: #fff;  line-height: 70rpx; }

回到顶部