-
Notifications
You must be signed in to change notification settings - Fork 0
/
caption_filter_n_transfermation.css
70 lines (63 loc) · 1.11 KB
/
caption_filter_n_transfermation.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
body{
padding: 1rem;
}
.gallery{
display: grid;
list-style-type: none;
padding: 0;
margin: 0;
grid-gap: 1rem;
grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
grid-auto-rows: 300px;
grid-auto-flow: dense;
}
/*this is added*/
.gallery li figure{
margin: 0;
width: 100%;
height: 100%;
position: relative;
}
/* ---------------- */
.wide{
grid-column: span 2;
}
.tall{
grid-row: span 2;
}
img{
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
/* Add Here */
.gallery li figure{
overflow: hidden;
}
.gallery img{
filter: invert(25%);
transform: scale(1.2);
transition: all .3s ease-in-out;
}
.gallery figure figcaption{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: grid;
align-content: end;
color: #fff;
text-shadow: 1px 1px 3px rgba(0,0,0,.5);
padding-left: 2rem;
opacity: 0;
transition: opacity .3s ease-in-out;
}
.gallery figure:hover img{
filter: invert(0);
transform: scale(1);
}
.gallery figure:hover figcaption{
opacity: 1;
}