-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrid.css
76 lines (65 loc) · 1.34 KB
/
grid.css
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
66
67
68
69
70
71
72
73
74
75
76
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(180deg, #355c7d, #6c5b7b, #c06c84)
}
header {
text-align: center;
background: linear-gradient(0deg, #355c7d, #6c5b7b, #c06c84);
color: #fff;
padding: 20px;
}
.gallery {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
padding: 20px;
}
.gallery-item {
position: relative;
overflow: hidden;
border: 1px solid #ccc;
transition: transform 0.3s;
}
.gallery-item img {
max-width: 100%;
height: auto;
display: block;
}
.gallery-item p {
background-color: rgba(0, 0, 0, 0.7);
color: #fff;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 5px;
margin: 0;
opacity: 0;
transition: opacity 0.3s;
}
.gallery-item:hover {
transform: scale(1.05);
}
.gallery-item:hover p {
opacity: 1;
}
header {
display: flex;
justify-content: center;
}
.gallery-item {
border: none;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
text-align: center;
}
.enlargeable {
transition: transform 0;
}
.enlargeable.enlarged {
transform: scale(5.5); /* You can adjust the scale factor as needed */
}