Here is my test demo in codepen. I hope to keep the same margin between items, so I use flex-grow: 1
to fill the over width.
However, the items of last row seems not keep the same width as previous rows. How to do it?
.row{
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
.col{
min-width: 160px;
flex-grow: 1;
margin: 10px 10px;
background:#eee;
height: 120px;
}
This is what I want, addon use flex-grow to keep the same margin