JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="item item1"></div>
<div class="item item2"></div>
<div class="item item3"></div>
<div class="item item4"></div>
<div class="item item5"></div>
<div class="item item6"></div>
</div>
CSS
body {
background: rgba(0, 0, 0, .02)
}
.container {
display: flex;
flex-flow: column wrap;
align-content: space-between;
height: 1080px;
max-width: 640px;
margin: 0 auto;
}
.item {
width: 49%;
margin-bottom: 2%;
background: #fff;
border-radius: 10px;
box-shadow: 0 1px rgba(0, 0, 0, .1), 1px 0 rgba(0, 0, 0, .1)
}
.item:nth-child(odd) { order: 1; }
.item:nth-child(even) { order: 2; }
/* Force new columns */
.container::before,
.container::after {
content: "";
flex-basis: 100%;
width: 0;
order: 2;
}
.item1 {
height: 150px;
}
.item2 {
height: 200px;
}
.item3 {
height: 100px;
}
.item4 {
height: 100px;
}
.item5 {
height: 120px;
}
.item6 {
height: 170px;
}