Mon Aug 01 2022
Amazing Image Gallery
CSS4930 views
File Name: amazing-img-gallery.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Amazing Image Gallery</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: #292929;
}
section {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}
.gallery {
display: flex;
width: 550px;
gap: 5px;
}
.gallery img {
height: 250px;
flex: 1;
object-fit: cover;
object-position: center;
overflow: hidden;
transition: 0.2s all cubic-bezier(0.175, 0.885, 0.32, 1.275);
cursor: pointer;
}
.gallery img:hover {
flex: 4;
}
</style>
</head>
<body>
<section>
<div class="gallery">
<img src="https://cdn.pixabay.com/photo/2022/07/11/18/01/woman-7315671_960_720.jpg" alt="" />
<img src="https://cdn.pixabay.com/photo/2022/02/16/01/45/child-7015868_960_720.jpg" alt="" />
<img src="https://cdn.pixabay.com/photo/2022/07/18/19/57/dog-7330712_960_720.jpg" alt="" />
<img src="https://cdn.pixabay.com/photo/2020/04/30/03/26/rufous-5111261_960_720.jpg" alt="" />
<img src="https://cdn.pixabay.com/photo/2022/04/24/16/52/animal-7154059_960_720.jpg" alt="" />
</div>
</section>
</body>
</html>
Result Screenshot(s)
Author:Geekboots