简体   繁体   English

将装订线添加到引导Flexbox网格

[英]Add gutter to bootstrap flexbox grid

I'm trying to add gutters to a Bootstrap 4 site. 我正在尝试将排水沟添加到Bootstrap 4站点。 I'm also using enable-flexbox:true ; 我也在使用enable-flexbox:true ;

I'm trying to achieve a look like http://designmodo.com/bootstrap-4-flexbox/ : 我正在尝试实现类似http://designmodo.com/bootstrap-4-flexbox/的外观: 在此处输入图片说明

There are equal gutters on the bottom of each item, and to the right of each item. 每个项目的底部和右边都有相等的装订线。

My code is pretty simple: 我的代码很简单:

<div class='row'>
  <div class='col-md-6 block'>
  </div>
</div>

and

.block {
  background: black;
  height: 200px;
}

However, this doesn't create gutters. 但是,这不会创建装订线。 All the blocks are connecting. 所有块都在连接。 I realize I can put block as a new div under .col-md-4, but that ruins flexbox responsiveness. 我意识到我可以将block作为新的div放在.col-md-4下,但这会破坏flexbox的响应能力。

更改引导程序默认装订线大小的简单方法http://arnique.net/web-design/58/a-quick-guide-to-changing-bootstraps-gutter-width/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM