-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (98 loc) · 4.87 KB
/
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
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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ciallo~(∠・ω< )⌒★</title>
<link rel="shortcut icon" href="/AlbertAwA.github.io/favicon.ico" />
</head>
<style>
.center {
width: 540px;
height: 120px;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
<body>
<div>
<marquee behavior="scroll" direction="left" scrollamount="30"><font color="red" size="15px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="15"><font color="aqua" size="11px">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="25"><font>Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="12"><font color="coral" size="10px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="28"><font color="red">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="20"><font color="greenyellow" size="13px">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="10"><font size="16px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="15"><font color="pink" size="20px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="11"><font color="aqua" size="6px">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="28"><font color="red">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="8"><font color="greenyellow" size="10px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="20"><font color="pink" size="9px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="13"><font color="green" size="5px">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="17"><font color="blue" size="5px">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="16"><font color="yellow" size="7px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="11"><font color="red" size="5px">Ciallo~(∠・ω< )⌒★</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="10"><font color="orange" size="8px">Ciallo~(∠・ω< )⌒☆</font></marquee>
<marquee behavior="scroll" direction="left" scrollamount="20"><font color="gray" size="9px">Ciallo~(∠・ω< )⌒★</font></marquee>
</div>
<div id="main" class="center">
<img src="ciallo.gif">
</div>
</body>
</html>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script type="text/javascript">
let a_idx = 0;
let ac = new AudioContext();
$(function (){
$("body").click(function(e) {
const a = new Array("Ciallo~(∠・ω< )⌒★", "Ciallo~(∠・ω< )⌒☆");
const $i = $("<span/>").text(a[a_idx]);
a_idx = (a_idx + 1) % a.length;
const x = e.pageX,
y = e.pageY;
$i.css({
"z-index": 999999999999999999999999999999999999999999999999999999999999999999999,
"top": y - 20,
"left": x,
"position": "absolute",
"font-weight": "bold",
"color": color16()
});
$("body").append($i);
load_sound('ciallo.aac');
$i.animate({
"top": y - 180,
"opacity": 0
},
1500,
function() {
$i.remove();
});
});
})
function color16(){
const r = Math.floor(Math.random()*256);
const g = Math.floor(Math.random()*256);
const b = Math.floor(Math.random()*256);
return `#${r.toString(16)}${g.toString(16)}${b.toString(16)}`;
}
function load_sound(url_data) {
const req = new XMLHttpRequest();
req.open('GET', url_data, true);
req.responseType = 'arraybuffer';
req.onload = function() {
ac.decodeAudioData(req.response, function(buffer){
const source = ac.createBufferSource();
source.buffer = buffer;
source.connect(ac.destination);
source.start(0);
},function (e) {
console.info('错误');
});
}
req.send();
}
</script>