Bootstrap 3 Grid,我需要一个容器吗? [英] Bootstrap 3 Grid, do I need a container?

查看:101
本文介绍了Bootstrap 3 Grid,我需要一个容器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩bootstrap 3,我注意到,如果你使用没有容器的网格系统变得流体,有人告诉我,我不应该这样做,因为系统设计在一个容器内。如果我不使用容器类,会发生什么?,我需要它吗?如果是这样,我可以使容器类宽度100%,而不麻烦bootstrap的媒体查询,或有任何其他或更好的方式来构建流体布局与bootrap 3.感谢高级。

I've been playing with bootstrap 3 and I noticed that if you use the Grid System without a container it becomes fluid, someone told me I shouldn't do that because the system was design to be within a container. What happens if I don't use the container class?, do I need it?, if so could I make the container class width 100% without messing up bootstrap's media-queries, or is there any other or better way to build a fluid layout with bootrap 3. Thanks in advanced.

推荐答案

应该包装 row container 中,或者您会遇到BS 3用于元素的负边距的问题。基本上,设计为在容器内。 阅读更多Bootstrap网格

You should wrap row in container or you'll have a problem with the negative margins that BS 3 uses for the row element. Basically the row is designed to be within a container. Read more on the Bootstrap grid

在Bootply上使用此示例进行播放: http://bootply.com/83751

Play with this example on Bootply: http://bootply.com/83751

这篇关于Bootstrap 3 Grid,我需要一个容器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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