【问题标题】:Bootstrap, Roots theme - Gap on right hand side at mobile viewBootstrap,Roots 主题 - 移动视图右侧的间隙
【发布时间】:2014-11-02 08:53:08
【问题描述】:

这是我的网站, http://www.superfastgoose.com/

我已经使用 root 构建了模板,对于我的生活,我无法弄清楚为什么在 768 像素以下的媒体右侧会有间隙。

最初您看不到页面加载的间隙,但您可以向右滚动。

任何帮助将不胜感激。

【问题讨论】:

  • 我看不到差距??
  • Use Bootstrap 3.2 or 3.3 (latest) 3.0 (what you are using) 有这个滚动条问题,但这是去年的,所以我的记忆可能有问题。

标签: css wordpress twitter-bootstrap


【解决方案1】:

请尝试将此 CSS 添加到您的样式表中,希望它能解决问题:

@media (max-width: 768px) {
    .container {
         width: 90%;
    }
}

如果使用屏幕尺寸小于 768 像素的设备访问网站,则另一种解决方案是为 body 简单地定义 overflow-x: hidden,如下所示:

@media (max-width: 768px) {
    body {
         overflow-x: hidden;
    }
}

【讨论】:

  • 谢谢,第一个建议是让它工作得很好。