【云荷六周年庆典】星河叹
<style>#papa { left: -214px; width: 1024px; height: 640px; background: gray url('https://pic.imgdb.cn/item/630abad516f2c2beb10f0468.jpg') no-repeat center/cover;box-shadow: 3px 3px 20px #000; position: relative; z-index: 1; }
#player { padding: 10px; position: absolute; left: 20px; bottom: 20px; width: fit-content; height: fit-content; display: flex; gap: 10px; flex-direction: column; }
#lrctext { font: bold 1.4em sans-serif; color: silver; text-shadow: 1px 1px 2px #000; user-select: none; transition: all 1.5s; }
#btnwrap { width: fit-content; height: fit-content; display: flex; gap: 8px; align-items: center; }
#btnmain { width: 36px; height: 36px; display: grid; place-items: center; background: rgba(0,0,0,.5); border-radius: 50%; cursor: pointer; transition: all 2s; }
#btnmain:hover { background: orange; }
#btnplay {width: 16px; height: 16px; background: #ccc; clip-path: polygon(0 0, 0% 100%, 100% 50%); }
#btnpause { width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #eee; display: none; }
#prgline { width: 200px; height: 4px; background: #ccc linear-gradient(to right,red,orange,green,red) no-repeat center left; background-size: 1px 4px; cursor: pointer;}
#tmsg { font: normal 16px sans-serif; color: orange; user-select: none; text-shadow: 1px 1px 1px #000; transition: 1.5s; }
#tmsg:hover, #lrctext:hover { color: tomato; }
</style>
<div id="papa">
<div id="player">
<div id="lrctext">lrc歌词</div>
<div id="btnwrap">
<span id="btnmain"><span id="btnplay"></span><span id="btnpause"></span></span>
<span id="prgline"></span><span id="tmsg">00:00 | 00:00</span>
</div>
</div>
</div>
<script>
let lrcAr = [
['00.00', '星河叹 - 黄龄'],
['260.00','感谢欣赏']
];
let aud = new Audio();
aud.src = 'http://www.kumeiwp.com/sub/filestores/2022/08/25/535aa5257b39689a10c46a52a0936f8b.mp3';
aud.autoplay = true;
aud.loop = true;
btnmain.onclick = () => aud.paused ? aud.play() : aud.pause();
prgline.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prgline.offsetWidth;
aud.addEventListener('pause', () => btnstate());
aud.addEventListener('play',() => btnstate());
aud.addEventListener('timeupdate', () => {
prgline.style.backgroundSize = prgline.offsetWidth * aud.currentTime / aud.duration + 'px 4px';
tmsg.innerText = toMin(aud.duration) + ' | ' + toMin(aud.currentTime);
for(j=0; j<lrcAr.length; j++) {
if(aud.currentTime >= lrcAr) lrctext.innerText = lrcAr;
}
});
let btnstate = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none') : (btnplay.style.display = 'none', btnpause.style.display = 'block');
let toMin = (val)=> {
if (!val) return '00:00';
val = Math.floor(val);
let min = parseInt(val / 60), sec = parseFloat(val % 60);
if(min < 10) min = '0' + min;
if(sec < 10) sec = '0' + sec;
return min + ':' + sec;
}
</script> 喜欢中国风,支持一下 柔美幽婉的歌声,别有味道。古风音乐确实很是受听。 感谢朵拉周年贺礼!周末愉快!{:1_155:} 风月无边 发表于 2022-8-28 09:56
喜欢中国风,支持一下
谢谢无边朋友的支持,周末愉快{:1_153:} 欧阳风刀 发表于 2022-8-28 12:11
感谢朵拉周年贺礼!周末愉快!
谢谢欧阳管理的临帖,周末愉快{:1_153:} 朵拉好久不见,谢谢带来的精彩礼物~~{:4_123:} 《星汉灿烂》主题曲,黄龄的演唱优美婉转动听
爱与恋、叹与怨,相伴相随到永远~~~~~~~~~ 问好朵拉,让我们一起庆贺画廊成立六周年~~~{:S01:} 朵拉好久不见
感谢分享的星河叹
共祝云荷六周年生日快乐
页:
[1]