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

查看:21
本文介绍了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屋!

查看全文
相关文章
前端开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆