-
Notifications
You must be signed in to change notification settings - Fork 0
/
gameOver.html
61 lines (58 loc) · 1.45 KB
/
gameOver.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FireCobraLost</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@1,800&display=swap');
body {
display: flex;
margin-top: 5%;
background-color: #5a5a39;
background-image: url("https://i.imgur.com/Ymt2DHg.jpeg");
background-repeat: no-repeat;
background-size: cover;
background-position: top;
color: #f46d10;
font-size: 100px;
font-family: 'Fira Sans', sans-serif;
}
section{
border: 3px solid black;
border-radius: 5%;
background-color: #465947;
padding: 2%;
}
#container {
display: flex;
justify-content: center;
}
#button {
display: block;
border: 2px solid black;
border-radius: 5%;
padding: 10px;
font-size: 30px;
user-select: none;
margin-bottom: 10%;
/* user-select learned from https://developer.mozilla.org/en-US/docs/Web/CSS/user-select*/
}
</style>
</head>
<body>
<section>
<h1>GAME OVER!</h1>
<div id="container">
<div id="button">Click to Play Again!<div>
</div>
</section>
</body>
<script>
document.querySelector('div').addEventListener('click', () =>{
location.href = 'index.html'
//location.href learned from https://www.codegrepper.com/code-examples/html/how+to+open+a+new+html+page+on+button+click+in+javascript
} )
</script>
</html>