-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
85 lines (76 loc) · 1.46 KB
/
style.css
File metadata and controls
85 lines (76 loc) · 1.46 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
* {
margin: 0;
padding: 0;
box-sizing:border-box;
}
body {
width: 100%;
height: 100vh;
background-color:#000;
background-image: url('cards/western_devil.png');
background-size: cover;
display:grid;
place-items:center;
}
img {
width: 30%;
height: 100%;
object-fit:cover;
-webkit-user-drag: none;
-webkit-user-select: none;
transform-origin:center;
transform:perspective(800px) rotatex(10deg);
transition:0.2s;
}
.container {
max-width:600px;
max-height:350px;
display:flex;
justify-content:center;
align-items:center;
gap:20px;
}
.container:hover img {
opacity:0.3;
}
.container img:hover {
opacity:1;
}
.scene {
width: 1000px;
display: flex;
justify-content: space-between;
perspective: 800px;
}
.scene .card {
position: relative;
width: 240px;
height: 300px;
color: white;
cursor: pointer;
transition: 0.8s ease-in-out;
transform-style: preserve-3d;
}
.scene .card:hover {
transform: rotateY(0.5turn);
}
.scene .card .card__face {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
transition: 0.8s ease-in-out;
-webkit-box-reflect: below 0 linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.2));
}
.scene .card .card__face img {
width: 240px;
height: 370px;
-o-object-fit: cover;
object-fit: cover;
}
.scene .card .card__face--back {
transform: rotateY(0.5turn);
}