I have already found out with the help of the search function here how I can display an image as a rhombus
img {
width: 500px;
height: 500px;
object-fit: cover;
clip-path: polygon(50% 0%,100% 50%,50% 100%,0% 50%);
}
However, I have not yet managed that the four corners are rounded.
I would also like to display the images staggered below each other. But my attempt only works if there are the same number of images in the last line. Can I solve this better?
img {
width: 150px;
height: 150px;
object-fit: cover;
clip-path: polygon(50% 0%,100% 50%,50% 100%,0% 50%);
}
.container {
text-align: center;
}
.line {
margin-top: -75px;
}
<div class="container">
<div class="normal-line">
<img src="https://images.....">
<img src="https://images.....">
<img src="https://images.....">
<img src="https://images.....">
<img src="https://images.....">
</div>
<div class="line">
<img src="https://images.....">
<img src="https://images.....">
<img src="https://images.....">
<img src="https://images.....">
</div>
</div>