【发布时间】:2017-07-10 06:39:17
【问题描述】:
我尝试使用基于负边距的网格系统 (susy) 实现类似网格的模式,但失败了。
我尝试使用 flexbox,但我不确定它是否真的可行,我认为最好的方法是 2 列(A 侧和 B 侧)并为框 (1) 提供 50% 的框 2 的 flex 高度,但它似乎不起作用。
据我所知,这是可行的。
.block {
width: 100%;
background: grey
}
.column {
align-content: stretch;
display: flex;
flex-flow: column wrap;
width: 50%;
}
.box_long {
background-color: pink;
flex: 0 0 50%;
padding: 20px;
border: solid 1px black;
}
.box_small {
background-color: blue;
flex: 0 0 25%;
padding: 20px;
border: solid 1px black;
}
.box_big {
background-color: green;
flex: 0 0 100%;
padding: 20px;
border: solid 1px black;
}
<div class="block">
<div class="column">
<div class="box_long">
</div>
<div class="box_big">
</div>
</div>
<div class="column">
<div class="box_small">
</div>
<div class="box_small">
</div>
<div class="box_small">
</div>
<div class="box_small">
</div>
<div class="box_long">
</div>
</div>
</div>
【问题讨论】:
标签: html css flexbox susy-sass