Repository navigation
Expand file tree
/
Copy pathstyles.css
More file actions
92 lines (82 loc) · 1.73 KB
/
Copy pathstyles.css
File metadata and controls
92 lines (82 loc) · 1.73 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
@font-face {
font-family: 'PressStart2P';
src: url('pressStart2P.ttf');
}
body {
background-color: #222225;
text-align: center;
font-family: PressStart2P, Helvetica, sans-serif;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
* {
box-sizing: border-box;
}
.container {
position: relative;
display: inline-block;
}
.hud {
position: absolute;
display: flex;
width: 100%;
align-items: center;
padding: 20px;
}
.player-max-health,
.enemy-max-health {
background-color: red;
height: 20px;
}
.player-health-container,
.enemy-health-container {
position: relative;
width: 100%;
border: 4px solid black;
}
.player-health-container {
border-right: 0;
}
.enemy-health-container {
border-left: 0;
}
.player-current-health,
.enemy-current-health {
position: absolute;
background-color: yellow;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.player-current-health {
text-align: end;
margin-left: auto;
}
.timer {
background-color: black;
color: white;
width: 100px;
height: 50px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.displayText {
position: absolute;
color: white;
align-items: center;
justify-content: center;
font-size: 1.5rem;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: none;
}