Skip to content

Instantly share code, notes, and snippets.

@RomanMaksudov
Created February 5, 2024 13:49
Show Gist options
  • Save RomanMaksudov/751f96727ba838cfab63cbc433946c9d to your computer and use it in GitHub Desktop.
Save RomanMaksudov/751f96727ba838cfab63cbc433946c9d to your computer and use it in GitHub Desktop.
justify-content
<h2>Галерея 1</h2>
<div class="gallery gallery-1">
<img src="img/photo-1.jpeg" alt="">
<img src="img/photo-2.jpeg" alt="">
<img src="img/photo-3.jpeg" alt="">
</div>
<h2>Галерея 2</h2>
<div class="gallery gallery-2">
<img src="img/photo-4.jpeg" alt="">
<img src="img/photo-5.jpeg" alt="">
<img src="img/photo-6.jpeg" alt="">
</div>
<h2>Галерея 3</h2>
<div class="gallery gallery-3">
<img src="img/photo-7.jpeg" alt="">
<img src="img/photo-8.jpeg" alt="">
<img src="img/photo-9.jpeg" alt="">
</div>
h2 {
margin: 0;
}
.gallery {
box-shadow: 5px 5px 10px grey;
padding: 20px;
margin-bottom: 20px;
display: flex;
}
.gallery-1 {
justify-content: flex-start;
}
.gallery-2 {
justify-content: flex-end;
}
.gallery-3 {
justify-content: space-between;
}
.gallery > img {
width: 200px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment