-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGallery-CSS.css
More file actions
65 lines (56 loc) · 1.09 KB
/
Copy pathGallery-CSS.css
File metadata and controls
65 lines (56 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* GALLERY SECTION CSS CODE */
body {
font-family: Arial, sans-serif;
background-color: #fffaf0;
margin: 0;
padding: 0;
}
#Gallery {
width: 90%;
margin: 5% auto;
}
.gallery-heading {
text-align: center;
color: #d2691e;
margin-bottom: 30px;
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.gallery-item {
position: relative;
overflow: hidden;
border-radius: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
cursor: pointer;
transition: transform 0.3s ease-in-out;
}
.gallery-item:hover {
transform: scale(1.05);
}
.gallery-item img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
transition: transform 0.5s ease;
}
.gallery-item:hover img {
transform: scale(1.1);
}
.gallery-caption {
position: absolute;
bottom: 0;
background: rgba(0,0,0,0.6);
color: #fff;
width: 100%;
padding: 10px;
text-align: center;
opacity: 0;
transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-caption {
opacity: 1;
}