-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.css
63 lines (59 loc) · 1.04 KB
/
design.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--main-transition: 300ms ease;
}
body {
width: 100vw;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
#card,
#back-card {
position: absolute;
width: 200px;
height: 300px;
overflow: hidden;
border-radius: 25px;
transition: var(--main-transition);
box-shadow: 0px 0px 10px #00000010;
}
.image {
width: 100%;
height: 100%;
object-fit: cover;
position: relative;
}
#card::before {
content: "";
position: absolute;
z-index: 1;
inset: 0;
transition: var(--main-transition);
}
#back-card {
z-index: -2;
transform: translatex(0px) rotate(0deg) scale(1);
}
#card:hover {
transform: scale(1.1);
}
#card:hover::after {
transform: translatey(-50%);
opacity: 1;
}
#card:hover::before {
background-color: #00000060;
}
#card:hover ~ #back-card {
transform: translatex(-100px) rotate(-10deg) scale(0.9);
}
#card:hover ~ #back-card:nth-child(2) {
transform: translatex(100px) rotate(10deg) scale(0.9);
}