为什么Bootstrap 3将容器宽度强制为特定大小? [英] Why does Bootstrap 3 force the container width to certain sizes?

查看:401
本文介绍了为什么Bootstrap 3将容器宽度强制为特定大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的浏览器大小为992像素宽,则.container的最大宽度为970像素。如果我的浏览器的大小为991px宽,那么.container的最大宽度为750px。为什么最大宽度有这么大的跳跃?为什么不是只有一个最大宽度为1170px左右,每边有20px的边距或什么,以便当你调整浏览器窗口的容器宽度缩放顺利,而不是一个大的跳跃?

If my browser is sized to be 992px wide, then .container has a max-width of 970px. If my browser is sized to be 991px wide, then .container has a max-width of 750px. Why is there this big jump in the max width? Why not just have a max-width of 1170px or so with 20px of margin on each side or something so that as you resize your browser window the container width scales smoothly instead of having a big jump?

例如在992px屏幕宽度我只有很少的边缘每边(11px)。然而在991px宽我有每边120px的边缘,这意味着几乎25%的屏幕空间是空边的边。这对我来说没有什么意义。有没有理由这样做?

E.g. at 992px screen width I have only very little margin on each side (11px). Yet at 991px wide I have 120px of margin on each side, which means nearly 25% of the screen real estate is empty margin on the sides. This doesn't make a lot of sense to me. Is there a reason this was done? Can I remove this behavior of preferring certain container widths without breaking things?

推荐答案

Bootstrap的官方回答:

The official answer from the Bootstrap folks:


简单来说,设计特定断点比设计无限,未知的大小更容易(在我看来)。
你提到的替代没有错误或坏,只是不同。我宁愿
我们保持具有非常具体范围的层次

What it boils down to is that designing for specific breakpoints is easier (in my mind) than designing for unlimited, unknown sizes. The alternative you mention isn't wrong or bad, just different. I'd rather us maintain the tiers with very specific ranges

这篇关于为什么Bootstrap 3将容器宽度强制为特定大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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