2
A
回答
0
从技术上讲这是可能的flex-flow: column-wrap
,但你需要知道的容器的高度,这样的项目可以适当包装,加上你需要重新排列柔性项目,因为默认顺序是垂直的。
@import url('https://fonts.googleapis.com/css?family=Montserrat');
html,
body {
margin: 0;
font-family: "Montserrat", sans-serif;
font-size: 16px;
}
.container {
height: 500px;
width: 200px;
display: flex;
padding: 2px;
flex-direction: column;
flex-wrap: wrap;
}
.cell {
color: white;
background: #e91e63;
height: 150px;
width: 100px;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid white;
border-radius: 5px;
}
.c2 {
order: 4;
height: 100px;
}
.c3 {
order: 2;
height: 100px;
}
.c4 {
order: 5;
height: 200px;
}
.c5 {
order: 3;
}
.c6 {
order: 6;
height: 100px;
}
<div class="container">
<div class="cell c1">1</div>
<div class="cell c2">2</div>
<div class="cell c3">3</div>
<div class="cell c4">4</div>
<div class="cell c5">5</div>
<div class="cell c6">6</div>
</div>
对于这个问题,结束了他人寻找一个只有CSS-砌筑的解决方案,我建议由Michael_B(唯一的,目前最完整的)如下回答:
相关问题
- 1. 如何使用flexbox创建砌体布局?
- 2. 使用MDL砌体布局
- 3. 画布砌体布局
- 4. 砌体将具体布局
- 5. 使用CSS创建砌体布局?
- 6. 使用砌体自动布局UITableViewCell
- 7. CSS - 网格/砌体布局
- 8. FacetWP制动砌体布局
- 9. isotope.js砌体布局特性
- 10. 如何使用flexbox编写此布局?
- 11. 如何使用砌体自动布局UItableviewCell高度
- 12. 如何仅使用CSS创建砌体布局?
- 13. 如何在砌体布局中使用下拉菜单?
- 14. 垂直不水平的砌体布局
- 15. 砌体布局与高度加载0px
- 16. 问题与响应砌体布局
- 17. Scroll View中的砌体布局
- 18. css网格的砌体布局
- 19. 砌体布局中的中心单列
- 20. 砌体/同位素布局中的孔
- 21. 砌体布局结算问题
- 22. 砌体风格响应式布局
- 23. 响应式砌体jQuery布局示例
- 24. 只有CSS的砌体风格布局
- 25. jQuery的砌体 - 流动布局问题
- 26. Tk,如何使用.pack进行布局?
- 27. Actionscript中的程序化砌体/空间布局布局
- 28. div与砌体布局内另一个石工布局
- 29. 如何正确堆砌砌体布局和延迟加载图像?
- 30. 使用砌体自动布局的xcode滑动抽屉
Make html and css snippet。 – Rahul
如果3比4高,或者如果1高于2,那么4就不会显示在2的下方。 – FelipeAls
在搜索“砌体布局css网页设计”后(因为我从未听过我之前发现了一些事情:砌体布局是我昨天称之为“Pinterest布局”的东西。谢谢你教我一个新的术语。以前关于flexbox砌体布局的问题* https://stackoverflow.com/q/28681572/7382273 * https://stackoverflow.com/q/20977390/7382273 – mat