Поведение подсчета столбцов в Safari (галерея изображений) ⇐ CSS

Разбираемся в CSS
Гость
Поведение подсчета столбцов в Safari (галерея изображений)

Сообщение Гость »


I created this image gallery using column-count and it works great in Chrome and most other browsers. But in Safari there is this weird bug: the image container starts at the previews column end and spans to the start of the next column. But the image is only in the second part of the container. Any idea how to fix that?

fiddle with reproduced bug

Код: Выделить всё

.image-gallery {     border: 1px solid red;     margin: 0;     padding: 0;     line-height: 0 !important;     column-count: 4;     -webkit-column-count: 4; } 
Image showing the bug

The gallery is created dynamically so I can't use flex and group images into divs for each column. I also don't want to use grid, as not all the images have the same aspect ratio and I don't want uneven spaces between the images.


Источник: https://stackoverflow.com/questions/781 ... ge-gallery

Вернуться в «CSS»