-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
102 lines (87 loc) · 1.71 KB
/
Copy pathstyles.css
File metadata and controls
102 lines (87 loc) · 1.71 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
}
body{
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: #6563ff;
}
.wrapper{
height: 400px;
width: 400px;
padding: 25px;
background-color: #f8f8f8;
border-radius: 10px;
}
.cards, .card, .view{
display: flex;
align-items: center;
justify-content: center;
}
.cards{
height: 100%;
width: 100%;
flex-wrap: wrap;
justify-content: space-between;
}
.cards .card{
cursor: pointer;
position: relative;
perspective: 800px;
transform-style: preserve-3d;
height: calc(100%/4 - 10px);
width: calc(100%/4 - 10px);
}
.card.shake {
animation: shake 0.35s ease-in-out;
}
@keyframes shake{
0%, 100%{
transform: translateX(0);
}
20%{
transform: translateX(-13px);
}
40%{
transform: translateX(13px);
}
60%{
transform: translateX(-8px);
}
80%{
transform: translateX(8px);
}
}
.cards .card .view{
width: 100%;
height: 100%;
user-select: none;
pointer-events: none;
position: absolute;
background: #fff;
border-radius: 7px;
backface-visibility: hidden;
transition: transform 0.25s linear;
box-shadow: 0 3px 10px rgba(0,0, 0, 0.1);
}
.card .front span{
color: #6563ff;
font-size: 40px;
}
.card .back{
transform: rotateY(-180deg);
}
.card .back img{
max-width: 45px;
}
.card.flip .front{
transform: rotateY(180deg);
}
.card.flip .back{
transform: rotateY(0);
}