Das Seltsame ist, dass dies in Firefox gut funktioniert, in Chrome oder Yandex jedoch.
Es scheint, dass Bilder aufgrund der Höhe von 400 Pixel nicht automatisch in die Flex-Box passen; die Breite: 100 % versucht, dem zu entsprechen 400px Höhe.
Hier sind HTML- und CSS-Teile:
Code: Select all
.article-images {
display: flex;
flex-direction: row;
justify-content: space-evenly;
gap: 20px;
width: 100%
}
.article-images-item {
width: 100%;
height: 400px;
object-fit: cover;
border-radius: 2px;
cursor: pointer
}Code: Select all
[img]http://placehold.co/100x400[/img]
[img]http://placehold.co/100x400[/img]
[img]http://placehold.co/100x400[/img]
[img]http://placehold.co/100x400[/img]
Wie es sein sollte (aktuell in Firefox):

Wie es jetzt aussieht (in Chrome oder einem anderen Browser)

Mobile version