【三伏消暑】第三天 芊 《大眠(抖音女生温柔版)》- 芊芊
<style>
#papa { left: -214px; width: 1024px; height: 680px; background: rgba(0,0,0,.6) url('https://pic.imgdb.cn/item/62d3b022f54cd3f937369265.jpg') no-repeat center/cover ; box-shadow: 3px 3px 24px #000; position: relative; }
#papa p { margin: 0; padding: 0; }
#papa input { border: none; outline: none; opacity: .75; cursor: pointer; }
#playbox { position: absolute; left: 20px; bottom: 20px; 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; }
#mama { left: 50px; bottom: 90px; width: 100px; height: 100px; position: absolute;transition: 1s; }
#mama:hover { cursor: pointer; transform: rotate(15deg); bottom: 80px; }
.piece { position: absolute; background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.35)); width: inherit; height: inherit; border-radius: 0 100%; transform-origin: 100% 100%; }
</style>
<div id="papa">
<div id="mama"></div>
<div id="playbox">
<p id="geci" style="font-size: 1.2em; text-shadow: 1px 1px 1px #222">loading ... </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>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1878610345.mp3" autoplay="autoplay" loop="loop"></audio>
<script>
let pieces = Array.from({length:6}, (_, x) => x * 30 - 30);
let num = (min, max) => Math.floor(Math.random() * (max-min+1)) + min;
let lrcAr = [ ['0.00','大眠(抖音女生温柔版)- 芊芊'], ['40.00','谢谢欣赏'] ];
for(idx in pieces) {
let ele = document.createElement('span');
ele.className = 'piece';
ele.style.transform = 'rotate(' + pieces + 'deg)';
mama.appendChild(ele);
}
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>
一个字美,两个字,美美,三个字,美美美{:4_199:}{:4_199:}{:4_199:} 浣溪沙 发表于 2022-7-18 08:23
一个字美,两个字,美美,三个字,美美美
谢谢支持!{:4_190:} 这朵透明的花儿用在这里真漂亮,底图的像素有点低,太模糊了点{:4_173:} 红影 发表于 2022-7-18 11:06
这朵透明的花儿用在这里真漂亮,底图的像素有点低,太模糊了点
是的。 楚楚可怜的小样纸{:4_189:} 樵歌 发表于 2022-7-18 11:54
楚楚可怜的小样纸
肯定是受了气才这样的。{:4_189:} 小女孩的声音好听{:4_199:} 闲言不语 发表于 2022-7-18 12:38
小女孩的声音好听
是的。谢谢支持! 祝老林朋友夏日安康。 赞!赞!赞! 梦油 发表于 2022-7-18 14:16
祝老林朋友夏日安康。
谢谢老梦! 小星世龙 发表于 2022-7-18 14:58
赞!赞!赞!
谢谢支持! 加林森 发表于 2022-7-18 12:11
肯定是受了气才这样的。
还不去多哄哄{:4_173:} 樵歌 发表于 2022-7-18 16:34
还不去多哄哄
我负责发,哄是你的事情了。{:5_117:} 加林森 发表于 2022-7-18 16:24
谢谢老梦!
好朋友别客气。 梦油 发表于 2022-7-19 09:43
好朋友别客气。
好的好的。
页:
[1]