-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
39 lines (34 loc) · 834 Bytes
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Game intro</title>
<link rel="stylesheet" href="introStyle.css">
</head>
<body>
<section id="container-intro">
<div id="clipped-title1">
<h1>Wild card</h1>
</div>
<a href="fight.html" onmouseover="heartbeat()" onmouseleave="heartbeatStop()" class="button">PRESS START</a>
</section>
<footer>
<p>©2018 Wild Card</p>
</footer>
<script>
const thunder = new Audio('music/Thunder.mp3');
thunder.volume = 0.2;
thunder.play();
const audio = new Audio('music/heartbeat-03.mp3');
const heartbeat = () => {
audio.play();
thunder.loop = false;
}
const heartbeatStop = () => {
audio.pause();
audio.currentTime = 0;
thunder.play();
}
</script>
</body>
</html>