-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcard.css
More file actions
52 lines (45 loc) · 891 Bytes
/
card.css
File metadata and controls
52 lines (45 loc) · 891 Bytes
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
body {
background-repeat: no-repeat;
background-position: 50% 0%;
background-color: black;
}
.container {
display: flex;
align-items: center;
justify-content: center;
}
.scene {
display: inline-block;
width: 100%;
margin: 20px 0;
perspective: 1000px;
max-width: 500px;
}
.card {
position: relative;
width: 100%;
height: 100%;
cursor: pointer;
transform-style: preserve-3d;
transform-origin: center right;
transition: transform 1s;
}
.image {
width: 100%;
border-radius: 10px;
}
.card.is-flipped {
transform: translateX(-100%) rotateY(-180deg);
}
.card__face {
position: absolute;
width: 100%;
height: 100%;
color: white;
text-align: center;
font-weight: bold;
backface-visibility: hidden;
}
.card__face--back {
transform: rotateY(180deg);
}