-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
87 lines (74 loc) · 1.46 KB
/
styles.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
77
78
79
80
81
82
83
84
85
86
87
body {
margin: 0;
margin-bottom: 25rem;
height: 100vh;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
height: 100vh;
}
.img-wrapper {
position: relative;
overflow: hidden;
}
.img-wrapper > img {
display: block;
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
object-position: center;
}
.img-wrapper > .content {
position: absolute;
inset: 0;
font-size: 2rem;
padding: 1rem;
background: rgba(255, 255, 255, .4);
display: flex;
justify-content: center;
align-items: center;
}
.img-wrapper > img,
.img-wrapper > .content {
transition: 200ms ease-in-out;
}
.img-wrapper:hover > img.blur {
filter: blur(5px);
}
.img-wrapper:hover > img.gray {
filter: grayscale(1);
}
.img-wrapper:hover > img.zoom {
transform: scale(1.1);
}
.img-wrapper > .content.fade {
opacity: 0;
}
.img-wrapper:hover > .content.fade {
opacity: 1;
}
.img-wrapper > .content.slide-left {
transform: translateX(-100%);
}
.img-wrapper:hover > .content.slide-left {
transform: translateX(0);
}
.img-wrapper > .content.slide-right {
transform: translateX(100%);
}
.img-wrapper:hover > .content.slide-right {
transform: translateX(0);
}
.img-wrapper > .content.slide-down {
transform: translateY(-100%);
}
.img-wrapper:hover > .content.slide-down {
transform: translateY(0);
}
.img-wrapper > .content.slide-up {
transform: translateY(100%);
}
.img-wrapper:hover > .content.slide-up {
transform: translateY(0);
}