【画笔似有马良功】欢度国庆
<div class="t_fsz"><table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_1643933">
<style>
#papa { left: 0px; width: 1024px; height: 640px; box-shadow: 4px 4px 30px #000; border-radius: 6px; overflow: hidden; position: relative; }
#mama {position: absolute; width: inherit; height: inherit; left: 0; top: -640px; background: #ccc url('http://bohann.net/data/attachment/forum/202309/25/193626lhgqqqjryh9rqfrj.jpg') no-repeat center / cover; }
#mama input { border: none; outline: none; opacity: .75; cursor: pointer; }
#mama p { margin: 0; padding: 0; }
.playbox { position: absolute; left: 10px; top: 10px; padding: 10px; font: normal 1em sans-serif; color: #eee; background: rgba(255,255,255,.2); border-radius: 8px; backdrop-filter: blur(1px); overflow: hidden; box-shadow: 1px 1px 2px rgba(0,0,0,.15); z-index: 100; }
#btnplay { width: 30px; height: 30px; border-radius: 50%; }
#btnplay:hover { background: #aaa; color: #ff0000; }
#papa > img { position: absolute; border: none; outline: none; }
#ufo2 { left: 0; top: 0; width: 200px; height: 150px; transition: all 2s; }
#tang1 { top: 420px; width: 220px; height: 220px; opacity: .2; cursor: pointer; }
@keyframes up { to { transform: translateY(-700px); } }
@keyframes down { to { top: 0px; } }
</style>
<div id="papa">
<img id="ufo2" src="https://s9.rr.itc.cn/r/wapChange/20173_30_19/a1s1ku5527508708296.jpg" alt="" />
<img id="tang1" src="http://bohann.net/data/attachment/forum/202309/25/173321b4kjk44k9hhqhblj.png" alt="" />
<div id="mama">
<div class="playbox">
<p id="geci" style="font-size: 1.2em; text-shadow: 1px 1px 1px #222">stand by ... </p>
<p style="display: flex; align-items: center; gap: 4px; margin-top: 10px;">
<input id="btnplay" type="button" value=">" />
<input id="slider" type="range" min="0" max="100" value="0" />
<span id="per">0%</span>
</p>
</div>
</div>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1483347047.mp3" loop="loop"></audio>
<script>
let lrcAr = [ ['0.00','纯音乐 - 欢度国庆'], ['120.00','没有音乐人生将与精彩无缘'] ];
let num = (min, max) => Math.floor(Math.random() * (max-min+1)) + min;
tang1.style.left = num(10,924) + 'px';
ufo2.style.left = num(0,924) + 'px';
tang1.onclick = () => {
tang1.style.opacity = 1;
ufo2.style.left = tang1.offsetLeft+ 30 + 'px';
ufo2.style.top = tang1.offsetTop - 60 + 'px';
setTimeout(() => {
ufo2.style.animation = tang1.style.animation = 'up 4s forwards';
},2200);
setTimeout(() => {
mama.style.animation = 'down 4s forwards';
aud.play();
},4300);
}
slider.onmousedown = () => aud.pause();
slider.onchange = () => { aud.currentTime = slider.value * aud.duration / 100; aud.play(); }
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('playing', () => btnplay.value = '||');
aud.addEventListener('pause', () => btnplay.value = '>');
aud.addEventListener('timeupdate', () => {
let prog = 100 * aud.currentTime / aud.duration;
slider.value = prog;
per.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
for(j=0; j<lrcAr.length; j++){
if(aud.currentTime >= lrcAr) geci.innerHTML = lrcAr;
}
});
let toMin = (val) => {
if(!val) return '0:0';
val = Math.floor(val);
return parseInt(val / 60) + ':' +parseFloat(val % 60);
}
</script>
</td></tr></table>
明天就是我们伟大的祖国成立74周年{:10_402:} 漂亮帖子,双节快乐{:10_403:} 国庆快乐
页:
[1]