Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
180 lines (172 loc) · 3.61 KB
/
Copy pathstyle.css
File metadata and controls
180 lines (172 loc) · 3.61 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
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
:root{
--hover: 2.5%
}
*{
position: relative;
padding: 0;
margin: 0;
}
body{
display: flex;
overflow: hidden;
width: 100vw; height: 100vh;
background-color: bisque;
align-items: center;
gap: 10rem;
}
main{
width: 100vw;
}
#main{
position: absolute;
box-sizing: content-box;
background-color: white;
top: 50vh; left: 50vw;
transform: translate(-50%, -50%);
overflow: hidden;
border: 10px solid black;
box-shadow: inset #00000050 5px 2.5px;
}
#title{
position: absolute;
left: 50%;
top: 1%;
transform: translateX(-50%);
background-color: #78051A;
border: 0.3rem solid #000000;
border-radius: 2rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 1rem;
box-shadow: 0 0 1rem rgba(0,0,0,0.5);
font-family: 'Orbitron', sans-serif;
}
div.entity{
width: 50px;
height: 50px;
background-color: red;
transition:all 200ms, rotate 50ms;
}
header{
display: flex;
height: 100vh; width: 20%;
top: 0;
flex-direction: column;
}
header section{
min-height: 20%;
scroll-behavior: smooth;
overflow: scroll;
}
header section.output{
position: absolute;
left: 0; bottom: 10%;
height: 50%; width: 100%;
}
header section.menu{
position: absolute;
display: flex;
flex-direction: column;
left: 1%; top: 10%;
height: 10%;
overflow: visible;
}
button{
width: 50%;
height: 10%;
}
/* Container voor de speler */
#player {
transition:all 200ms, rotate 50ms;
position: absolute;;
width: 50px;
height: 50px;
}
/* Vierkant */
#player .square {
width: 100%;
height: 100%;
background-color: #1104FE; /* Blauwe fill */
border: 2.5px solid #000000; /* Zwarte rand */
box-sizing: border-box;
box-shadow: 0 4px 4px 0 #00000050; /* Schaduw */
border-radius: 10px; /* Afgeronde hoeken */
position: absolute; /* Overlap met andere vormen */
top: 0;
left: 0;
z-index: 1; /* Zorgt dat het vierkant achter de andere elementen blijft */
}
/* Driehoek */
#player .triangle {
width: 0;
height: 0;
border-left: 12.5px solid transparent; /* Linker helft */
border-right: 12.5px solid transparent; /* Rechter helft */
border-bottom: 25px solid #00000057; /* Zwarte fill met transparantie */
position: absolute;
bottom: 0%; /* Iets naar beneden om in het midden te staan */
transform: translateX(-50%);
left: 50%;
z-index: 2; /* Driehoek boven het vierkant */
}
/* Balk */
#player .bar {
width: 100%;
height: 20%;
background-color: #ffffff36; /* Witte transparante fill */
border-top-left-radius: 30px; /* Linksboven afgerond */
border-top-right-radius: 30px; /* Rechtsboven afgerond */
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
position: absolute;
top: 0; /* Helemaal bovenaan het vierkant */
left: 0;
z-index: 3; /* Balk boven de driehoek en het vierkant */
}
@keyframes hover {
0% {
transform: translateY(0); /* Beginpositie */
}
33%{
transform: translateY(var(--hover));
}
66%{
transform: translateY(calc(0 - var(--hover)));
}
}
#player{
animation: hover 2500ms ease-in-out infinite;
}
h1.gameOver {
color: crimson;
text-align: center;
font-size: clamp(2rem, 5vw, 5rem); /* schaalbaar */
position: absolute;
top: 5%;
left: 50%;
transform: translateX(-50%);
margin: 0;
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}
p.score {
left: 50%;
transform: translateX(-50%);
text-align: center;
color: gold;
font-size: 1.5rem;
text-align: center;
bottom: 2.5%;
position: absolute;
}
p.score span {
opacity: 0;
color: greenyellow;
font-size: 2rem;
font-weight: bold;
animation: fadeIn 1s ease 1s forwards;
}
@keyframes fadeIn {
to { opacity: 1; }
}