-
Notifications
You must be signed in to change notification settings - Fork 0
/
masonry.css
76 lines (63 loc) · 919 Bytes
/
masonry.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
img {
width: 100%;
}
.container {
width: 95%;
margin: 0 auto;
height: 100vh;
}
.grid {
display: flex;
}
.grid-item {
padding: 6px;
}
.grid-col {
flex: 1;
padding: 0 0.1em;
}
.grid-col--2,
.grid-col--3 {
display: none;
}
.content {
position: absolute;
/* background: rgba(0, 0, 0, 0.8); */
/* color: white; */
margin-top: 1em;
}
@media (min-width: 768px) {
.container {
width: 90%;
}
.grid-col--2 {
display: block;
}
.grid-col {
padding: 0 0.5em;
}
img {
margin-bottom: 0.8em;
}
.content {
opacity: 0;
transform: translateX(-0.5em);
transition: all 2s;
will-change: opacity, transform;
}
/* .grid-item:hover {
cursor: pointer;
} */
.grid-item:hover .content {
opacity: 1;
transform: translateX(0);
}
}
@media (min-width: 1200px) {
.grid-col--3 {
display: block;
}
.container {
width: 95%;
}
}