twitter-bootstrap 引导响应容器宽度

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16578583/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 17:08:27  来源:igfitidea点击:

bootstrap-responsive container width

twitter-bootstrapcontainers

提问by Petran

I am using bootstrap-responsive and scaffolding successfully, my question is if I can increase the container's width and keep the responsive capabilities <div class="container" style="width:1300px">?

我正在成功使用引导响应和脚手架,我的问题是我是否可以增加容器的宽度并保持响应能力 <div class="container" style="width:1300px">

回答by GaryP

It seems you want to use the whole width of a wide screen desktop screens... If that's what you want, while keeping it responsive/fluid. Then you may just change your div class to

似乎您想使用宽屏幕桌面屏幕的整个宽度......如果这就是您想要的,同时保持它的响应性/流畅性。然后你可以将你的 div 类更改为

from
<div class="container">

to

<div class="container-fluid">

回答by Mo.

if you are on bootstrap 3use .container-fluidinstead of .container

如果您在引导程序 3 上使用.container-fluid而不是.container

<div class="container-fluid">
  <div class="row">
    ...
  </div>
</div>

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

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

reference:-http://getbootstrap.com/css/#grid

参考:- http://getbootstrap.com/css/#grid