forked from lsblakk/browser-pairs
-
Notifications
You must be signed in to change notification settings - Fork 16
/
style.css
345 lines (295 loc) · 7.6 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
/*
This is a CSS file. CSS (Cascading Style Sheets) is a language for describing the
appearance of web pages. To create good-looking web pages, you need to learn CSS
in order to define the appearance and location of the HTML elements within the pages.
You can learn more about CSS here:
https://developer.mozilla.org/en-US/learn/css
This is a CSS comment. Anything inside these slashes and asterisks will be ignored
by the browser, which is handy for adding explanations to your CSS code!
*/
/* This selector matches any element on the page */
* {
padding: 0;
margin: 0;
}
/* The body element holds the whole web page */
body {
/*
Task 5 - Change the background color of the page
Try changing the background color of the page. Right now, this color specified in HEX
notiation, but you can also try experimenting with color keywords.
Try changing the rule below to:
background-color: blue;
For more colors, see: http://www.html-color-names.com/color-chart.php
*/
background-color: #F26522; /* this is the background color of the page */
color: #DA4930; /* this is the default color of text on the page */
font-family: "Days One", sans-serif; /* this is the default font on the page */
text-align: center; /* this centers text on the page */
}
/* The #game element holds the game area */
#game {
background-color: black; /* this is the background color that appears behind the cards */
position: absolute; /* the rules here all handle positioning the #game element on the page */
display: block;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 255px;
height: 420px;
margin: auto;
box-shadow: 0px 3px 12px #000;
border-radius: 4px;
padding: 10px;
}
/* These rules create the images on the cards */
.front {
/*
Task 6 - Change the image that appears on the front of the cards
Right now, we're using a path to the an image included in a directory in our game,
but you can also use an image that is hosted anywhere on the internet!
Try changing the rule below to:
background-image: url(http://www.raritananimalhospital.com/images/cat.jpg);
For the best results, try finding images that are about the same size as the images
that are currently being used (they're all 120x189 pixels).
*/
background-image: url(./images/card.png); /* this is the image that appears on the front of all the cards */
background-position: 0 0;
border-radius: 4px;
z-index: 10;
}
.ie {
background-image: url(./images/ie.png);
background-repeat: no-repeat;
background-size: contain;
}
.fx {
background-image: url(./images/fx.png);
background-repeat: no-repeat;
background-size: contain;
}
.cr {
background-image: url(./images/cr.png);
background-repeat: no-repeat;
background-size: contain;
}
.sf {
background-image: url(./images/sf.png);
background-repeat: no-repeat;
background-size: contain;
}
.op {
background-image: url(./images/op.png);
background-repeat: no-repeat;
background-size: contain;
}
.ns {
background-image: url(./images/ns.png);
background-repeat: no-repeat;
background-size: contain;
}
.tb {
background-image: url(./images/tb.png);
background-repeat: no-repeat;
background-size: contain;
}
.fm {
background-image: url(./images/fm.png);
background-repeat: no-repeat;
background-size: contain;
}
/* The #gameIntro element holds the screen that shows when you start the app */
#gameIntro {
text-align: center;
position: absolute;
margin: 10px;
top: 0;
left: 0;
bottom: 0;
right: 0;
-moz-transition: opacity 1s ease-out;
-webkit-transition: opacity 1s ease-out;
-o-transition: opacity 1s ease-out;
transition: opacity 1s ease-out;
}
#game.open #gameIntro {
background-image: url(./images/start.png); /* this is the image that appears when you start the game */
background-position: center center;
background-repeat: no-repeat;
opacity: 1;
z-index: 3;
}
#game.play #gameIntro, #game.end #gameIntro {
display: none;
}
/* The #gameStats element is the header bar at the top of the game */
#game.play #gameStats {
display: block; /* this shows the bar when you start playing the game */
background-color: #eee;
width: 100%;
float: left;
box-shadow: inset 0 0 8px #000;
border-radius: 4px;
padding: 8px 0;
height: 14px;
font-size: 12px;
}
#gameStats {
display: none;
}
/* The rules here are applied to the #install, #gamePlay, and #gameAgain buttons */
.button {
background-color: white;
border-radius: 5px;
font-size: 2em;
padding: 10px;
width: 150px;
border: 8px solid #DA4930;
z-index: 99;
}
/* :hover styles are applied when the user's mouse hovers over the element */
.button:hover {
background-color: #F26522 !important;
color: #fff;
cursor: pointer;
}
/* The #gameComplete element holds the screen that shows when you finish the game */
#gameComplete {
background-image: url(./images/end.png);
background-position: center 0;
background-repeat: no-repeat;
text-align: center;
position: absolute;
margin: 10px;
top: 0;
left: 0;
bottom: 0;
right: 0;
visibility: hidden;
z-index: 1;
}
#game.end #gameComplete {
opacity: 1;
z-index: 3;
visibility: visible;
top: 0;
bottom: 0;
}
#gameComplete a.button {
background-color: white;
border-radius: 5px;
display: block;
font-size: 30px;
margin: 8px auto 0;
padding: 10px;
width: 200px;
border: 8px solid #DA4930;
text-decoration:none;
}
/* The #result element holds the score that appears at the end of the game */
#result {
background-color: white;
margin: 150px auto 0;
width: 60%;
border-radius: 5px;
font-size: 20px;
border: 8px solid #DA4930;
padding: 20px 0;
position: relative;
}
#install {
margin: 10px auto 0;
display: none;
}
#install.visible {
display: block;
}
#gamePlay {
margin: 220px auto 0;
display: block;
}
#loading.loaded {
display: none;
}
/* The #reset button and the #gameScore button are in the header bar */
#reset,
#gameScore {
display: block;
float: left;
text-align: left;
padding: 0 0 0 15px;
}
#reset {
cursor: pointer;
}
/* The #cards element holds the cards */
#cards {
position: absolute;
top: 50px;
left: 0;
bottom: 0;
right: 0;
display: none;
z-index: 2;
}
#game.play #cards {
display: block;
}
/*
The rules below here all control styling the cards, including the animations
that make the cards cards flip over
*/
.card {
-webkit-perspective: 300px;
-moz-perspective: 300px;
width: 56px;
height: 88px;
position: absolute;
-moz-transition: all .3s ease;
-webkit-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
cursor: pointer;
}
.face {
width: 100%;
height: 100%;
position: absolute;
-webkit-transition-property: opacity, transform, box-shadow;
-webkit-transition-duration: .5s;
-webkit-backface-visibility: hidden;
-moz-transition-property: opacity, -moz-transform, box-shadow;
-moz-transition-duration: .5s;
-moz-backface-visibility: hidden;
-o-transition-property: opacity, -o-transform, box-shadow;
-o-transition-duration: .5s;
-o-backface-visibility: hidden;
}
.back {
-webkit-transform: rotate3d(0,1,0,-180deg);
-moz-transform: rotate3d(0,1,0,-180deg);
z-index: 8;
border-radius: 4px;
}
.card:hover .face, .card-flipped .face {
box-shadow: 0 0 10px #ccc;
}
.card-flipped .front {
-webkit-transform: rotate3d(0,1,0,180deg) scale(1.1);
-moz-transform: rotate3d(0,1,0,180deg) scale(1.1);
-o-transform: scale(1.1);
z-index: 8;
}
.card-flipped .back {
-webkit-transform: rotate3d(0,1,0,0deg) scale(1.1);
-moz-transform: rotate3d(0,1,0,0deg) scale(1.1);
-o-transform: scale(1.1);
z-index: 10;
}
.card-removed {
opacity: 0;
}
.reset {
box-shadow: 0 0 30px #fff;
}