How do I dynamically create a collage (grid with no gaps) of images, where images have different heights?

前端 未结 2 1306
眼角桃花
眼角桃花 2021-02-15 18:41

I want to display a page of thumbnails. The thumbnails are user uploaded artwork images. Each image has a constrained width, but not a constrained height, this is to show the

2条回答
  •  滥情空心
    2021-02-15 18:59

    If you want to do this in css only you have to create divs for every column, and float those columns (but it messes up order of images).

    Alternatively, you can use jquery plugin like this one.

提交回复
热议问题