twitter-bootstrap Twitter bootstrap 3 响应但应该修复
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17980866/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Twitter bootstrap 3 responsive but should be fixed
提问by tDiesel
I am under the impression that there is not a fixed grid system with the new Twitter Bootstrap 3. Am I correct in making this assumption? I've searched the documentation but all I find is the new grid system that is responsive. The project that I am currently working on does not require the site to be responsive. There is probably a simple solution here.
我的印象是新的 Twitter Bootstrap 3 没有固定的网格系统。我做出这个假设是否正确?我已经搜索了文档,但我发现的只是响应式的新网格系统。我目前正在从事的项目不需要网站响应。这里可能有一个简单的解决方案。
回答by Zim
Yes, you are correct in that the new grid is fluid only. You can create a simple fixed layout with a wrapper like this..
是的,您是正确的,因为新网格仅是流动的。您可以使用这样的包装器创建一个简单的固定布局..
<div class="container-fixed">
.. the usual Bootstrap markup here...
</div>
CSS
CSS
.container-fixed {
margin: 0 auto;
max-width: 800px;
}
Example: http://bootply.com/71142
Update for Bootstrap 3.1
Bootstrap 3.1 更新
The container-fluidhas returned in Bootstrap 3.1..
http://www.bootply.com/121222
在container-fluid已引导3.1返回..
http://www.bootply.com/121222
回答by akvallejos
Not sure if this was written at the time of the original question, but the documentation gives the steps on how to disable the responsiveness.
不确定这是否是在提出原始问题时编写的,但文档提供了有关如何禁用响应能力的步骤。
回答by Valentin Despa
Similar to @Skelly's answer:
类似于@Skelly 的回答:
/* Reset the container */
.container {
max-width: none !important;
width: 970px;
}
Read about this in Disabling responsiveness
在禁用响应中阅读有关此内容的信息

