加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 4.61 KB
一键复制 编辑 原始数据 按行查看 历史
weiguanyu 提交于 2020-02-17 04:27 . fix mobile exp
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>cytus_theme_remix</title>
</head>
<body>
<div class="pageAudio">
<audio id="charAudio_PAFF" preload loop style="opacity: 0" volume="0.4">
<source src="audio/PAFF.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_NEKO" preload loop style="opacity: 0" volume="0.4">
<source src="audio/NEKO.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_ROBO" preload loop style="opacity: 0" volume="0.4">
<source src="audio/ROBO_Head.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Ivy" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Ivy.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Crystal_PuNK" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Crystal_PuNK.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Miku" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Miku.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Xenon" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Xenon.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_ConneR" preload loop style="opacity: 0" volume="0.4">
<source src="audio/ConneR.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Cherry" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Cherry.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_JOE" preload loop style="opacity: 0" volume="0.4">
<source src="audio/JOE.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Sagar" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Sagar.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Rin" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Rin.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Aroma" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Aroma.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Nora" preload loop style="opacity: 0" volume="0.4">
<source src="audio/Nora.mp3" type="audio/mp3">
</audio>
<audio id="charAudio_Neko2" preload loop style="opacity: 0" volume="0.4">
<source src="audio/NEKO2.mp3" type="audio/mp3">
</audio>
</div>
<div>
<img id="img_PAFF" src="img/Paff.png" alt="Paff" onclick="entrance(0)"/>
<img id="img_NEKO" src="img/Neko.png" alt="NEKO#ΦωΦ" onclick="entrance(1)"/>
<img id="img_ROBO" src="img/ROBO_Head.png" alt="ROBO_Head" onclick="entrance(2)"/>
<img id="img_Ivy" src="img/Ivy.png" alt="Ivy" onclick="entrance(3)"/>
<img id="img_Crystal_PuNK" src="img/Crystal_PuNK.png" alt="Crystal_PuNK" onclick="entrance(4)"/>
<img id="img_Miku" src="img/Miku.png" alt="Miku" onclick="entrance(5)"/>
<img id="img_Xenon" src="img/Xenon.png" alt="Xenon" onclick="entrance(6)"/>
<img id="img_ConneR" src="img/ConneR.png" alt="ConneR" onclick="entrance(7)"/>
<img id="img_Cherry" src="img/Cherry.png" alt="Cherry" onclick="entrance(8)"/>
<img id="img_JOE" src="img/Joe.png" alt="JOE" onclick="entrance(9)"/>
<img id="img_Sagar" src="img/Sagar.png" alt="Sagar" onclick="entrance(10)"/>
<img id="img_Rin" src="img/Rin.png" alt="Rin" onclick="entrance(11)"/>
<img id="img_Aroma" src="img/Aroma.png" alt="Aroma" onclick="entrance(12)"/>
<img id="img_Nora" src="img/Nora.png" alt="Nora" onclick="entrance(13)"/>
<img id="img_Neko2" src="img/Neko2.png" alt="Neko" onclick="entrance(14)"/>
</div>
<script>
var global = false;
var All = ["PAFF", "NEKO", "ROBO", "Ivy", "Crystal_PuNK", "Miku", "Xenon", "ConneR", "Cherry", "JOE", "Sagar", "Rin", "Aroma", "Nora", "Neko2"];
function AllStart() {
for (var i = 0; i < All.length; i++) {
var audio = document.getElementById("charAudio_" + All[i]);
audio.muted = true;
audio.play();
}
global = true;
}
function checkData(aud) {
for (var i = 0; i < All.length; i++) {
var audio = document.getElementById("charAudio_" + All[i]);
audio.currentTime = aud.currentTime;
}
}
function entrance(i) {
if (!global) {
AllStart();
}
var audio = document.getElementById("charAudio_" + All[i]);
var img = document.getElementById("img_" + All[i]);
if (audio.muted) {
audio.muted = false;
img.border = 2;
checkData(audio);
} else {
audio.muted = true;
img.border = 0;
}
}
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化