这是 link到网站。
网站没有滚动(你可以使用箭头移动),正文有overflow:hidden
。
Body 包含 3 个 block :.main-content
、.bottom1
和 .footer
.main-content
有 100vh
。
.bottom1
和 .footer
都有 position:fixed
。
.Footer
有 bottom: 0
,.bottom1
有 bottom: 80px
。
桌面工作正常:高度为 100vh
,其他 block 位于底部。 ios手机浏览器也可以。 但 android 浏览器的高度很大(比预期大 3 倍),用户必须向下滚动才能看到页脚。有人知道如何解决这个问题吗?
最佳答案
应用 position:fixed;
到 .main-content
将解决这个问题。
.main-content {
position: fixed;
left: 0;
width: 100%;
height: 100vh;
}
关于javascript - Android 手机问题(100vh 和位置固定页脚错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55478252/