-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
173 lines (166 loc) · 3.19 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
html, body, h1, h2, section {
margin: 0;
padding: 0;
}
body {
background-color: #CFD0CF;
min-width: 600px;
min-height: 600px;
font-family: Arial, Helvetica, sans-serif;
color: #434344;
user-select: none;
}
.page-wrapper {
width: 100%;
height: 100%;
padding-top: 40px;
}
.title, .timer {
font-weight: bold;
text-align: center;
}
.title {
font-size: 42px;
line-height: 47px;
margin-bottom: 40px;
}
.main {
display: flex;
justify-content: center;
}
.grid-box {
perspective: 600px;
display: grid;
gap: 25px;
grid-template-columns: repeat(4, 130px);
grid-template-rows: repeat(3, 130px);
}
.card {
display: block;
position: relative;
width: 100%;
height: 100%;
transition-duration: 500ms;
transform-style: preserve-3d;
}
.card:hover {
cursor: pointer;
}
.card-rotated {
transition: transform 500ms;
transform: rotateY(180deg);
}
.front, .back {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
backface-visibility: hidden;
box-sizing: border-box;
border: 5px solid #fff;
border-radius: 9px;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}
.front {
display: flex;
justify-content: center;
align-items: center;
font-size: 65px;
background-color: #fff;
transform: rotateY(180deg);
}
.matched {
background-color: #5AD66F;
border-color: #5AD66F;
}
.not-matched {
background-color: #F44336;
border-color: #F44336;
}
.non-clickable {
pointer-events: none;
}
.back {
background: linear-gradient(to top right, #22AB93, #19668D);
}
.timer {
font-size: 32px;
line-height: 36px;
margin-top: 30px;
}
.modal {
display: none;
position: fixed;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1;
}
.visible {
display: flex;
}
.pop-up {
min-width: 350px;
height: auto;
background-color: #fff;
}
.game-result {
display: block;
text-align: center;
font-size: 48px;
font-weight: bold;
margin: 30px 0 0;
}
.game-result span {
display: inline-block;
position: relative;
transform-origin: center bottom;
animation: letter-jump 1s infinite;
}
.game-result span:nth-child(2) {
animation-delay: 0.1s;
}
.game-result span:nth-child(3) {
animation-delay: 0.2s;
}
.game-result span:nth-child(4) {
animation-delay: 0.3s;
}
@keyframes letter-jump {
0% {
transform: scaleY(1);
animation-timing-function: ease-out;
}
25%,35% {
transform: translateY(-4px) scaleY(1.4);
animation-timing-function: ease-in;
}
90% {
transform: translateY(0) scaleY(0.6);
animation-timing-function: ease-in;
}
100% {
transform: translateY(0) scaleY(1);
animation-timing-function: ease-out;
}
}
button {
display: block;
margin: 40px auto 30px;
height: 40px;
font-size: 20px;
font-weight: bold;
color: #fff;
background: linear-gradient(to left, #22AB93, #19668D);
border: 0;
border-radius: 10px;
padding: 0 30px;
box-shadow: 1px 1px 1px #434344;
outline: none;
}
.clicked {
box-shadow: inset 2px 1px 8px #434344;
}