-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
77 lines (65 loc) · 1.09 KB
/
styles.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
body {
height: 100vh;
margin: 0;
}
#app {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 12px;
}
.card {
width: 200px;
height: 300px;
perspective: 1000px;
margin: 12px;
}
.card:hover {
cursor: pointer;
.card-inner {
border-color: #cccccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
}
}
.card:focus {
outline: none;
.card-inner {
border-color: #666666;
}
}
.card:focus, .card:hover {
.card-inner {
border-width: 2px;
margin: -1px;
}
}
.card-inner {
width: 100%;
height: 100%;
position: absolute;
transform-style: preserve-3d;
border: 1px solid #dddddd;
border-radius: 6px;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
transition: border-color 0.3s, box-shadow 0.3s, transform 0.6s;
}
.card.flip .card-inner {
transform: rotateY(180deg);
}
.face {
width: 100%;
height: 100%;
position: absolute;
backface-visibility: hidden;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
}
.front {
transform: rotateY(0deg);
}
.back {
transform: rotateY(180deg);
}