CSS columns bug — 5 column count only showing 4 (with images)

前端 未结 3 662
夕颜
夕颜 2020-12-10 19:08

I am trying to implement Chris Coyier\'s example of using CSS columns to create a seamless responsive grid of images.

I put Chris\'s files onto my server and everyth

3条回答
  •  有刺的猬
    2020-12-10 19:38

    Ok I have an answer, although it is a workaround, not a fix. I changed up the images so that some were 300px in height and others, 370px. Basically I varied the the height of the images and kept the width of all the images the same, 300px. So the answer is to either not use square images, or if you want to use all square images, use column-count:4 instead of 5.

    If anyone can provide further insight into why this happens that would be great.

提交回复
热议问题