Bootstrap 3 grid with different height in each item - is it solvable using only CSS?

前端 未结 8 1489
小蘑菇
小蘑菇 2020-12-23 21:20

I\'m trying to make a grid of thumbnails, where each thumbnail has an image and a label. It works fine if all the labels have the same length, because then all the thumbnail

8条回答
  •  有刺的猬
    2020-12-23 22:11

    If you don't know how many columns you have, you can do:

    .row.fix {
      display: flex;
      flex-wrap: wrap;
      width:100%; /*not always necessary*/
    }
    

    Working fiddle: https://jsfiddle.net/wqdm1jjt/

    Example:

    Author: Juan Miguel

提交回复
热议问题