所以我在我的网站上使用 BackStretch jQuery 插件,到目前为止它运行良好。我看到的唯一问题是,在移动垂直屏幕上,当我开始向下滚动时,底部会出现一个空白白条 - 就在顶部 url 和底部浏览器菜单缩小/消失之后。当顶部和底部浏览器栏消失时,body 标记中的背景似乎没有记录它需要调整大小。关于如何解决这个问题的任何想法?我正在使用 Boostrap 3.0,并且在垂直滚动条上出现了一些白条问题,但我能够使用 overflow-x:hidden 解决这个问题。任何想法将不胜感激。该网站位于http://ivynursery.jacobbuller.com - 您可以在关于http://ivynursery.jacobbuller.com/about.php和联系方式上查看问题http://ivynursery.jacobbuller.com/contact.php页面。
这是我为 body 和 container div 设置的 css:
html,
body {
height: 100%;
position: relative;
}
body {
overflow-x: hidden;
/* Removes right space for browser scrollbar on mobile */
}
.container {
margin-right: 15px;
/* Adjust content to make up for hidden x-overflow 15px on mobile */
}
@media (min-width: 768px) {
.container {
margin-right: auto;
/* Adjust content to middle for non-mobile */
}
}