如何使弹性箱中的物品始终保持相同的高度?目前,我只能让它在同一行中使高度均匀,但下一行可能更高或更短。有没有办法纠正这个并使每一行都相同的高度?
main {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
div {
width: 33%;
background-color: lightblue;
margin-bottom: 10px;
}
p {
line-height: 50px;
}
<main>
<div><p>Random text that may or may not be the same everywhere</p></div>
<div><p>Random text that may or may not be the same everywhere and making some of these divs taller then others</p></div>
<div><p>Random text that may or may not be the same everywhere</p></div>
<div><p>Random text that may or may not be the same everywhere</p></div>
<div><p>Random text that may or may not be the same everywhere</p></div>
<div><p>Random text that may or may not be the same everywhere</p></div>
</main>