Bootstrap中的流体容器3 [英] Fluid Container in Bootstrap 3

查看:101
本文介绍了Bootstrap中的流体容器3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在bootstrap 3中创建流体容器?



在bootstrap 2.3.2 .container-fluid 在那里。但现在在bootstrap 3它缺少,并且只有 .container 类。请帮帮我。

解决方案

Bootstrap 3.0 已移至移动优先方法。 .container 真的只有在你需要/想要一个boxy布局的情况下。但如果您完全豁免 div.container-fluid ,则默认情况下会保留一个流畅的布局。



<例如,要有一个两列流体布局,只需使用:

 < 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>


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屋!

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