如图 软件盘弹起的时候,没有把底部顶上去,目前只发现在小米微信浏览器有这种情况,有人遇到过么?用css解决的办法?
你是用position:fixed定位到底下的吗
你可以用css简单解决:
当input 被 focus的时候将
input:focus{
position:fixed;
top:50px;
}
吧这个input移到上方,输入完成后又会自己回到原来位置
.body {
position: absolute;
top: 0; bottom: 0;
left: 0; right: 0;
}
@media (max-width: 768px) and (orientation: landscape) {
.body {bottom: auto;height: 200%;}
}
我一般是这样写的,效果还不错
3 回答1.4k 阅读✓ 已解决
2 回答2.5k 阅读✓ 已解决
3 回答1.1k 阅读✓ 已解决
2 回答1.3k 阅读✓ 已解决
5 回答1.8k 阅读
1 回答2.7k 阅读
1 回答1.6k 阅读✓ 已解决
1、目前使用css无解。。只能使用js判断,类似于 input:focus 是设置 bottom
2、新建一个页面 https://github.com/maxzhang/maxzhang.git...