Я надеюсь, что смогу получить несколько советов по достижению определенного макета галереи изображений, который я пытался воссоздать, вот макет: ![enter image description here](https://i.stack.imgur.com/f3dfz.png)
Ссылка наsite https://www.styleshout.com/templates/preview/Sublime10/index.html
, поскольку вы можете видеть, что одно изображение в каждом ряду немного выше другого, а остальные ряды идеально вписываются друг в друга.
Вот небольшая попытка написания кода, которую я сделал, но я просто застрял в том, как получить этот макет:
body {
margin: 0;
border-sizing: border-box;
display: flex;
justify-content: center;
width: 100%;
}
figure {
margin: 0;
display: inline;
}
.gallery-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
width: 600px;
figure {
height: 350px;
picture img {
width: 350px;
height: 350px;
}
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Flexible Image Gallery</title>
</head>
<body>
<div class="gallery-container">
<figure>
<picture>
<img src="https://source.unsplash.com/random/204x200" alt="" />
</picture>
</figure>
<figure>
<picture>
<img src="https://source.unsplash.com/random/209x200" alt="" />
</picture>
</figure>
<figure>
<picture>
<img src="https://source.unsplash.com/random/205x200" alt="" />
</picture>
</figure>
<figure>
<picture>
<img src="https://source.unsplash.com/random/202x200" alt="" />
</picture>
</figure>
<figure>
<picture>
<img src="https://source.unsplash.com/random/201x200" alt="" />
</picture>
</figure>
<figure>
<picture>
<img src="https://source.unsplash.com/random/206x200" alt="" />
</picture>
</figure>
</div>
</body>
</html>
Спасибо за любую помощь!