-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
107 lines (91 loc) · 1.82 KB
/
style.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
@import url('https://fonts.googleapis.com/css2?family=Lugrasimo&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lora&family=Lugrasimo&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
height: 100vh;
background-color: #131313;
display: grid;
place-items: center;
font-family: "Lora&family", sans-serif;
color: white;
}
.card {
width: 400px;
aspect-ratio: 1 / 0.7;
border-radius: 8px;
position: relative;
}
.image-box{
width: 100%;
height: 100%;
border-radius: inherit;
}
.image-box img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: 50% 60%;
border-radius: inherit;
transition: 0.5s ease-in-out;
}
.card::after {
content: "";
position: absolute;
inset: 0;
border: 2px solid white;
border-radius: inherit;
opacity: 0;
transition: 0.4s ease-in-out;
}
.card:hover img {
filter: grayscale(1) brightness(0.4);
}
.card:hover::after {
opacity: 1;
inset: 20px;
}
.content {
width: 80%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.content h2,
.content p,
.content h4 {
opacity: 0;
transition: 0.4s 0.2s ease;
}
.content h2 {
font-family: Lugrasimo;
margin-bottom: 8px;
scale: 0.7;
}
.content p {
font-size: 14px;
color: #d1d1d1;
transform: translate(50%);
}
.content h4 {
font-size: 20px;
color: #d1d1d1;
transform: translate(-50%);
}
.card:hover .content h2 {
scale: 1;
opacity: 1
}
.card:hover .content p {
opacity: 1;
transform: translateY(0);
}
.card:hover .content h4 {
opacity: 1;
transform: translateX(0);
}