แถวที่มีความสูงเท่ากันในคอนเทนเนอร์แบบยืดหยุ่น
ในขณะที่คุณสามารถมองเห็นlist-itemsในครั้งแรกที่มีเหมือนกันrow heightแต่รายการในครั้งที่สองมีความแตกต่างกันrow ฉันต้องการทุกรายการจะมีเครื่องแบบheightsheight มีวิธีการเพื่อให้บรรลุนี้โดยไม่ให้การใด ๆคงที่สูงและเป็นเพียงการใช้flexbox ? นี่คือไฟล์ code .list { display: flex; flex-wrap: wrap; max-width: 500px; } .list-item { background-color: #ccc; display: flex; padding: 0.5em; width: 25%; margin-right: 1%; margin-bottom: 20px; } .list-content { width: 100%; } <ul class="list"> <li class="list-item"> <div class="list-content"> <h2>box 1</h2> <p>Lorem ipsum dolor sit amet, …