-
Notifications
You must be signed in to change notification settings - Fork 163
/
style.css
100 lines (90 loc) · 2.01 KB
/
style.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: rgb(99, 4, 47);
}.wrapper{
height: 400px;
width:400px ;
background: white;
border-radius: 10px;
}.back-view img{
max-width: 50px;
max-height: 50px;
justify-content: space-around;
}.cards,.card,.view{
display: flex;
align-items: center;
justify-content: space-around;
/* background: red; */
background: whitesmoke;
}.cards{
height: 100%;
width: 100%;
flex-wrap: wrap;
justify-content: space-between;
padding: 10px;
position: relative;
perspective: 800px;
transform-style: preserve-3d;
} .card{
height: 25%;
width: 25%;
cursor: pointer;
position: relative;
perspective: 800px;
transform-style: preserve-3d ;
}
.view{
height: 100%;
width: 100%;
background:rgb(255, 228, 240);
position: absolute;
transition: 0.25s linear ;
backface-visibility: hidden;
pointer-events: none;
user-select: none;
}
.back-view{
justify-content: space-around;
height: 85px;
width: 85px;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
border-radius: 5px;
transform:rotateY(-180deg)
}.front-view{
justify-content: space-around;
height: 85px;
width: 85px;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
border-radius: 5px;
}h1{
font-size: 42;
color:rgb(99, 4, 47); ;
}.card.flip .back-view{
transform: rotateY(0);
}.card.flip .front-view{
transform: rotateY(180deg);
} .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);
}
}