Bootstrap 3 中的流体容器 [英] Fluid Container in Bootstrap 3
问题描述
如何在 bootstrap 3 中制作流体容器?
在 bootstrap 2.3.2 .container-fluid
类中.但是现在在引导程序 3 中它丢失了并且只有 .container
类.请帮我.
Bootstrap 3.0 转向移动优先"方法..container
实际上只在您需要/想要四四方方的布局的情况下才存在.但是,如果您完全免除 div.container-fluid
,则默认情况下您会使用流体布局.
例如,要拥有两列的流体布局,只需使用:
<header>...</header><div style="padding:0 15px;"><!-- 偏移行负填充 --><div class="row"><div class="col-md-6">50%</div><div class="col-md-6">50%</div>
<页脚>...</页脚>
How to make fluid container in bootstrap 3?
In bootstrap 2.3.2 .container-fluid
class is there. But now in bootstrap 3 it is missing and there is only .container
class. Please help me.
Bootstrap 3.0 moved to a "mobile first" approach. .container
is really only there in instances where you need/want a boxy layout. but, if you exempt the div.container-fluid
entirely, you're left with a fluid layout by default.
for example, to have a two-column fluid layout, simply use:
<body>
<header>...</header>
<div style="padding:0 15px;"><!-- offset row negative padding -->
<div class="row">
<div class="col-md-6">50%</div>
<div class="col-md-6">50%</div>
</div>
</div>
<footer>...</footer>
</body>
这篇关于Bootstrap 3 中的流体容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!