柔性箱垂直空间

时间:2016-08-08 18:35:36

标签: html css flexbox

请运行下面的代码段。

有没有办法让flex项目不被强制与它们相邻的项目一致?

我想通过对齐项目来消除创建的空间。基本上就是这个(我想用当前的结构实现这个目标。我宁愿不进入2列布局):

enter image description here

html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
.item-list {
  max-width: 400px;
  border: 1px solid red;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
.item-list__item {
  border: 1px solid green;
  width: 50%;
}
<div class="item-list">
  <div class="item-list__item">
    Is we miles ready he might going. Own books built put civil fully blind fanny. Projection appearance at of admiration no. As he totally cousins warrant besides ashamed do. Therefore by applauded acuteness supported affection it. Except had sex limits
    county enough the figure former add. Do sang my he next mr soon. It merely waited do unable.
  </div>
  <div class="item-list__item">
    Is we miles ready he might going. Own books built put civil fully blind fanny. Projection appearance at of admiration no. As he totally cousins warrant besides ashamed do.
  </div>
  <div class="item-list__item">
    Is we miles ready he might going. Own books built put civil fully blind fanny. Projection appearance at of admiration no. As he totally cousins warrant besides ashamed do. Therefore by applauded acuteness supported affection it. Except had sex limits
    county enough the figure former add. Do sang my he next mr soon. It merely waited do unable.
  </div>
  <div class="item-list__item">
    Is we miles ready he might going. Own books built put civil fully blind fanny. Projection appearance at of admiration no. As he totally cousins warrant besides ashamed do.
  </div>
</div>

0 个答案:

没有答案