-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTiltedCard.css
More file actions
65 lines (59 loc) · 1.04 KB
/
TiltedCard.css
File metadata and controls
65 lines (59 loc) · 1.04 KB
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
.tilted-card-figure {
position: relative;
width: 100%;
height: 100%;
perspective: 800px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.tilted-card-mobile-alert {
position: absolute;
top: 1rem;
text-align: center;
font-size: 0.875rem;
display: none;
}
@media (max-width: 640px) {
.tilted-card-mobile-alert {
display: block;
}
.tilted-card-caption {
display: none;
}
}
.tilted-card-inner {
position: relative;
transform-style: preserve-3d;
}
.tilted-card-img {
position: absolute;
top: 0;
left: 0;
object-fit: cover;
border-radius: 15px;
will-change: transform;
transform: translateZ(0);
}
.tilted-card-overlay {
position: absolute;
top: 0;
left: 0;
z-index: 2;
will-change: transform;
transform: translateZ(30px);
}
.tilted-card-caption {
pointer-events: none;
position: absolute;
left: 0;
top: 0;
border-radius: 4px;
background-color: #fff;
padding: 4px 10px;
font-size: 10px;
color: #2d2d2d;
opacity: 0;
z-index: 3;
}