我可以放大 Bootstrap 中的“.container”吗?
Can I enlarge the '.container' in Bootstrap?
我在 Bootstrap 中有一个页面,但我希望 .container
更宽一些。我可以更改此 .container
的 width
吗?
您可以轻松覆盖 Bootstrap 的默认呈现方式,只需包含您自己的 CSS 文件,然后执行以下操作:
.container {
/* Write your custom width here! */
}
有几种可能:
自定义css
正如已经建议的那样,您可以在自己的 css 中覆盖默认值。请记住,您可能必须使用媒体查询为不同的屏幕尺寸定义其中的几个
自定义bootstrap
在 bootstrap's own customization page 上,您几乎可以更改任何定义并生成 bootstrap 的自定义版本。查找名为 Container sizes
的部分
流体容器
如果您只想要一个横跨整个屏幕宽度的容器,请使用 .container-fluid
而不是 .container
<div class="container-fluid">
...
</div>
我在 Bootstrap 中有一个页面,但我希望 .container
更宽一些。我可以更改此 .container
的 width
吗?
您可以轻松覆盖 Bootstrap 的默认呈现方式,只需包含您自己的 CSS 文件,然后执行以下操作:
.container {
/* Write your custom width here! */
}
有几种可能:
自定义css
正如已经建议的那样,您可以在自己的 css 中覆盖默认值。请记住,您可能必须使用媒体查询为不同的屏幕尺寸定义其中的几个
自定义bootstrap
在 bootstrap's own customization page 上,您几乎可以更改任何定义并生成 bootstrap 的自定义版本。查找名为 Container sizes
的部分流体容器
如果您只想要一个横跨整个屏幕宽度的容器,请使用 .container-fluid
而不是 .container
<div class="container-fluid">
...
</div>