页面右侧的 Twitter 引导程序白色间隙 [英] Twitter bootstrap white gap on right side of page

查看:20
本文介绍了页面右侧的 Twitter 引导程序白色间隙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Twitter Bootstrap 响应式样式表出现问题.该网站显示正常,没有任何问题,但无论出于何种原因,响应式平板电脑和手机在页面右侧都有这个巨大的白色间隙.它不是滚动条问题,而是一个巨大的白色间隙

I am having an issue with my responsive stylesheet with Twitter Bootstrap. The site shows up fine with no issues but for whatever reason the responsive tablet and phone have this huge white gap to the right of the page. Its not the scroll bar issue its a huge white gap

http://i.imgur.com/JeRRRqq.png

我不相信我在这里发生了太大的变化.没有宽度或任何东西.检查 Chrome 中的对象,看不到任何超出宽度的东西

I dont believe I have changed to much at all here. Nothing with width or anything. Inspected the objects in Chrome and couldnt see anything overflowing over width wise

推荐答案

这可能有点晚了,但我发现其他答案具有误导性.

This might be a little late but I found the other answers to be misleading.

行类确实是导致问题的原因,但那是因为它始终应该放置在容器元素中.

It is true that the row class is what is causing the issue, but that is because it is always supposed to be placed inside a container element.

来自http://getbootstrap.com/css/:

行必须放置在 .container(固定宽度)或 .container-fluid(全宽)中,以便正确对齐和填充.

Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding.

容器元素通常在左右两边都有 -15px 的 padding,而 row 类在左右两边都有 15px 的 padding.两者相互抵消.如果两者之一不存在,您将看到额外的空间.

The container element usually has a -15px padding on both right and left and the row class has a 15px padding on right and left. The two cancel each other out. If one of the two is not present you will see extra space.

这篇关于页面右侧的 Twitter 引导程序白色间隙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆