html - Bootstrap 用列填充空白空间

标签 html css twitter-bootstrap twitter-bootstrap-3

我正在尝试使用 bootstrap 模拟网格,但我在放置其中一列时遇到了一个小问题。

我试过摆弄 div 和偏移/拉动的位置,但没有成功。

为了阐明我想要实现的目标,在中间的柱子中应该有三个相同高度的 block ,此时中间有一个空隙。如果可能,列应填充可用空间。类似于下面(不按比例)。

enter image description here

http://www.bootply.com/KeQzWKbzPG

CSS

.grid-item--height2 { height: 202.5px; }
.grid-item--height5 { height: 405px; }
.grid-item--height7 { height: 607.5px; }
.tile {border:2.5px solid white; }
.blue-background {background-color:blue;}
.orange-background {background-color:orange;}

html

<html>
<body>
<div class="container-fluid">
  <div class="row-fluid">
      <div class="col-md-5 grid-item--height2 blue-background tile text-center">

      </div>

      <div class="col-md-5 grid-item--height2 blue-background tile text-center">

      </div> 

      <div class="col-md-2 grid-item--height2 orange-background tile text-center">

      </div>

      <div class="col-md-4 grid-item--height7 blue-background tile text-center">

      </div>



      <div class="col-md-4 grid-item--height2 blue-background tile text-center">

      </div>


      <div class="col-md-4 grid-item--height5 blue-background tile text-center">

      </div>


        <div class="col-md-4 grid-item--height2 blue-background tile text-center">

      </div>

      <div class="col-md-4 grid-item--height2 blue-background tile text-center">

      </div>


      <div class="col-md-4 grid-item--height2 blue-background tile text-center ">

      </div>
  </div>
</div>
</body>
</html>

最佳答案

似乎这个笨蛋帮助解决了这个问题。

http://www.bootply.com/LKWPlNHti9

关于html - Bootstrap 用列填充空白空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32627819/

相关文章:

javascript - 将日期选择器添加到文本框

HTML/CSS : How can I float the 'a href' elements to the left without them leaving the div element that they are inside in?

javascript - Highcharts NG 股票图表动画效果仅在导航器类型 : column

html - 将文本添加到 CSS 复选框开关

javascript - 如何使 Bootstrap 下拉菜单在悬停时起作用

html - 一个 div 和兄弟 div 自动高度的动态高度

javascript - 如何从另一个页面 html 打开 Bootstrap 模式?

javascript - Bootstrap 模式 : background jumps to top on toggle

javascript不创建输入框

javascript - 为什么带有 pdf 文件的 &lt;iframe&gt; 没有显示在页面上?