Skip to content

Commit 3ee6308

Browse files
committed
feat: adjust game life component in screen to be responsible
1 parent c1059ab commit 3ee6308

1 file changed

Lines changed: 104 additions & 18 deletions

File tree

src/library/pages/css/styles.css

Lines changed: 104 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -227,45 +227,69 @@ ul li a:hover {
227227
}
228228

229229
#main {
230-
height: 100%;
230+
min-height: 100vh;
231+
display: flex;
232+
flex-direction: column;
233+
position: relative;
234+
padding: 0;
235+
box-sizing: border-box;
231236
}
232237
#menu{
233-
width: 650px;
234-
height: 50px;
238+
width: 100%;
239+
min-height: 50px;
235240
position: absolute;
236-
background: transparent;
237-
right: 0px;
241+
background: transparent;
242+
left: 0;
243+
right: 0;
244+
margin: 0;
238245
bottom: 0px;
239246
color: white;
240247
font-family: Guardians;
248+
display: flex;
249+
align-items: stretch;
250+
justify-content: center;
251+
gap: 0;
252+
}
253+
254+
#gameContainer {
255+
width: 100%;
256+
min-height: 100vh;
257+
display: flex;
258+
flex-direction: column;
259+
background: #191644;
260+
}
261+
262+
#game {
263+
flex: 1;
241264
}
242265

243266
#menu .left-menu {
244267
width: 0;
245268
height: 0;
246-
border-top: 50px solid transparent;
247-
border-right: 30px solid #222222;
269+
border-top: 0px solid transparent;
270+
border-right: 0px solid #222222;
248271
border-bottom: 0px solid transparent;
249272
float: left;
250273
}
251274
#menu .center-menu{
252275
background: #222222;
253-
width: 620px;
254-
height: 50px;
255-
float: left;
276+
flex: 1;
277+
min-height: 50px;
278+
display: flex;
279+
align-items: center;
280+
gap: 8px;
281+
padding: 0 12px;
256282
}
257283
#menu .center-menu .text{
258-
width: 80px;
259-
float: left;
260-
margin: 15px 5px;
284+
min-width: 60px;
285+
margin: 0;
261286
}
262287
#menu .center-menu .result{
263-
width: 180px;
264-
float: left;
265-
margin: 15px 5px;
288+
min-width: 120px;
289+
margin: 0;
266290
}
267291
#menu .center-menu .value{
268-
width: 60px;
292+
min-width: 60px;
269293
}
270294
#menu .center-menu progress{
271295
width: 80%;
@@ -279,6 +303,68 @@ ul li a:hover {
279303

280304
}
281305

306+
@media (max-width: 768px) {
307+
#main {
308+
padding: 0 12px 90px 12px;
309+
}
310+
311+
#menu {
312+
position: fixed;
313+
left: 0;
314+
right: 0;
315+
bottom: 0;
316+
flex-direction: column;
317+
align-items: stretch;
318+
margin: 0;
319+
max-width: none;
320+
z-index: 900;
321+
padding: 0 12px 12px 12px;
322+
}
323+
324+
#menu .left-menu,
325+
#menu .right-menu {
326+
display: none;
327+
}
328+
329+
#menu .center-menu {
330+
border-radius: 6px;
331+
display: grid;
332+
grid-template-columns: auto 1fr;
333+
align-items: center;
334+
gap: 8px 12px;
335+
padding: 8px 12px;
336+
}
337+
338+
#menu .center-menu .text,
339+
#menu .center-menu .result,
340+
#menu .center-menu .value {
341+
flex: initial;
342+
}
343+
344+
#menu .center-menu progress {
345+
width: 100%;
346+
}
347+
}
348+
349+
@media (max-width: 480px) {
350+
#main {
351+
padding: 0 8px 100px 8px;
352+
}
353+
354+
#menu .center-menu {
355+
gap: 6px;
356+
row-gap: 6px;
357+
grid-template-columns: auto 1fr;
358+
}
359+
360+
#menu .center-menu .text,
361+
#menu .center-menu .result,
362+
#menu .center-menu .value {
363+
flex: initial;
364+
text-align: left;
365+
}
366+
}
367+
282368
/* Modal */
283369
#modal{
284370
display: none;
@@ -320,4 +406,4 @@ ul li a:hover {
320406
width: 100% !important;
321407
height: calc(100vh - 50px) !important;
322408
filter: brightness(75%);
323-
}
409+
}

0 commit comments

Comments
 (0)