I'm trying to build a layout like this one with flexbox:
how can I stack the items on top of one another?
I build what's on the above screenshot using CSS grid, but failing to do this with flexbox.
.grid {
display: grid;
height: 100%;
grid-template-columns: 2rem repeat(2, auto) 2rem;
grid-template-rows: 4rem 4rem auto;
background-color: #fff;
}
.layer1 {
background-color: rgb(64, 213, 187);
grid-column-start: 1;
grid-column-end: span 3;
grid-row-start: 1;
grid-row-end: span 3;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…