我需要使用 Bootstrap 3 的导航栏,但它似乎有点问题。在我的 Lumia 820 上,我查看了默认导航栏,但无法滚动导航栏中的菜单内容。我可以滚动菜单后面的正文,而不是菜单。 在桌面上,我可以使用 Overflow:auto CSS 很好地滚动菜单内容,但在移动设备上,我无法滚动、自动或隐藏。有什么想法吗?
图片在这里:/image/8lxXj.png
最佳答案
我想为正确的解决方案添加一些修复。特别是修复折叠动画:
.navbar-nav {
height: 100vh; // <-- This will fix the collapse animation
}
.navbar-collapse.in {
overflow-x: hidden;
padding-right: 17px; // <-- Hide scroll bar, but still being able to scroll
}
@media (min-width: 768px) {
.navbar-nav {
height: auto;
}
}
关于css - Bootstrap 3 : opened navbar's content can't scroll on mobile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22013642/