-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindexAlvin.html
105 lines (85 loc) · 2.39 KB
/
indexAlvin.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
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
<!DOCTYPE html>
<html>
<head>
<title>FUNK</title>
<meta charset="UTF-8" />
<!-- <iframe src="1.mp3" allow="autoplay" style="display:block" id="myaudio"></iframe> -->
<style>
#notes1 {
-webkit-animation: rotation 0.5s infinite linear;
-webkit-animation-direction: alternate;
position: absolute;
left:900px;
top: 300px;
}
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(-45deg);
}
to {
-webkit-transform: rotate(30deg);
}
}
#notes2 {
-webkit-animation: rotation 0.5s infinite linear;
-webkit-animation-direction: alternate;
position:absolute;
left:1000px;
top: 700px;
}
#notes3 {
-webkit-animation: rotation 0.5s infinite linear;
-webkit-animation-direction: alternate;
position: absolute;
left:100px;
top: 300px;
}
</style>
</head>
<body>
<audio
controls
autoplay
id = "myaudio"
src="1.mp3">
</audio>
<script type="text/javascript">
var sounds = new Array();
sounds[0]="1.mp3";
sounds[1]="2.mp3";
sounds[2]="3.mp3";
sounds[3]="4.mp3";
sounds[4]="5.mp3";
sounds[5]="6.mp3";
sounds[6]="7.mp3";
sounds[7]="8.mp3";
sounds[8]="9.mp3";
sounds[9]="10.mp3";
sounds[10]="11.mp3";
sounds[11]="12.mp3";
sounds[12]="13.mp3";
sounds[13]="14.mp3";
sounds[14]="15.mp3";
sounds[15]="16.mp3";
sounds[16]="17.mp3";
sounds[17]="18.mp3";
sounds[18]="19.mp3";
sounds[19]="20.mp3";
sounds[20]="21.mp3";
sounds[21]="22.mp3";
sounds[22]="23.mp3";
sounds[23]="24.mp3";
function getRandomSounds() {
var randomNum = Math.floor(Math.random()*sounds.length);
document.getElementById("myaudio").src=sounds[randomNum];
}
document.getElementById("myaudio").addEventListener("ended", function(){
getRandomSounds();
});
</script>
<img id="boom" src="boombox.png" onclick="getRandomSounds()" height="1000px" width="1000px">
<img id="notes1" src="notes.png" height="100px" width="100px">
<img id="notes2" src="notes1.png" height="100px" width="100px">
<img id="notes3" src="notes2.png" height="100px" width="100px">
</body>
</html>