飞升 - 巫娜
<style>
#papa { left: -250px; width: 1100px; height: 700px; box-shadow: 3px 3px 20px #000; background: lightblue url('https://pic.imgdb.cn/item/630e1a6c16f2c2beb12d5257.jpg') no-repeat center/cover; user-select: none; position: relative; z-index: 2; }
#btnwrap { position: absolute; left: calc(50% - 80px); bottom: 20px; width: 100px; height: 100px; display: grid; place-items: center; }
#btnwrap span { position: absolute; transition: all 1.2s; }
#h5player { width: 100px; height: 100px; border-radius: 50%; background: #ffffae conic-gradient(from 0deg, #ffff96, #3c2010, #ffff96 1%, snow 0); mask: radial-gradient(transparent 60%, #ffff96 61%, #ffff96 0); -webkit-mask: radial-gradient(transparent 60%, #ffff96 61%, #ffff96 0); }
#btnplay { left: 15px; width: 20px; height: 20px; background: #3c2010; clip-path: polygon(0 0, 0% 100%, 100% 50%); cursor: pointer; }
#btnplay:hover { background: tomato; }
#btnpause { left: 20px; width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #ffffae; display: none; cursor: pointer; }
#btnpause:hover{ border-color: transparent tomato; }
#tmsg { left: 40px; font: normal 16px sans-serif; color: #ffffae; }
#lrctext { position: absolute; left: calc(50% + 30px); 140px; bottom: 50px; font: bold 1.5em sans-serif; color: #ffffae; text-shadow: 1px 1px 1px #000; transition: 1.2s; }
#lrctext:hover, #tmsg:hover { color: orange; }
</style>
<div id="papa">
<div id="btnwrap">
<span id="h5player"></span><span id="btnplay"></span><span id="btnpause"></span>
<span id="tmsg">00:00<br>00:00</span>
</div>
<div id="lrctext">lrc歌词</div>
</div>
<script>
let aud = new Audio();
let lrcAr = [
['0.00','飞升 - 巫娜'],
['270.00','心地无碍自纵横']
];
aud.src = 'http://music.163.com/song/media/outer/url?id=304962.mp3';
aud.autoplay = true;
aud.loop = true;
btnplay.onclick = () => aud.play();
btnpause.onclick = () => aud.pause();
h5player.onmousemove = (e) => h5player.style.cursor =isHover(e.offsetX, e.offsetY) ? 'pointer' : 'default';
h5player.onclick = (e) => {
if (isHover(e.offsetX, e.offsetY)) {
let deg = Math.atan2(e.offsetY - 50, e.offsetX - 50) * 180 / Math.PI;
deg += (e.offsetX < 50 && e.offsetY < 50) ?450 : 90;
aud.currentTime = aud.duration * deg / 360;
}
}
aud.addEventListener('pause', () => btnstate());
aud.addEventListener('play',() => btnstate());
aud.addEventListener('timeupdate', () => {
tmsg.innerHTML = toMin(aud.currentTime) + '<br>' + toMin(aud.duration);
h5player.style.background = 'conic-gradient(from 0deg, #ffff96, #3c2010, #ffff96 ' + aud.currentTime / aud.duration * 100 + '%, #ffffae 0)';
for (j = 0; j < lrcAr.length;j ++) {
if (aud.currentTime >= lrcAr) lrctext.innerHTML = lrcAr;
}
});
let isHover = (x,y) => Math.pow(x - 50, 2) + Math.pow(y - 50, 2) >= Math.pow(40, 2);
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> 美 漂的制作。我现在在手机上看时间有点问题。等会我上电脑看。 图图制作很美妙,音乐也极好听。色彩调配得也好,清舟这个帖子真的太美了{:4_199:} 清舟友友,你在前面,俺在后面紧紧跟着。。。飞天改命。。。。飞出去看看,没啥不可呢{:4_204:} 现在电脑上看就正常了。清舟制作得真美!{:4_199:} 美美哒 清舟朋友总能制作出让人拍案惊奇的作品来。 梦油 发表于 2022-8-31 10:00
清舟朋友总能制作出让人拍案惊奇的作品来。
{:4_181:} 马黑黑 发表于 2022-8-31 12:58
谢谢您的赞同。 梦油 发表于 2022-8-31 14:17
谢谢您的赞同。
{:4_190:} 亚伦影音工作室 发表于 2022-8-30 22:42
美
谢谢亚伦,你的作品才厉害呢 加林森 发表于 2022-8-30 22:46
漂的制作。我现在在手机上看时间有点问题。等会我上电脑看。
是啊,手机上看是有点歪的了 梦油 发表于 2022-8-31 10:00
清舟朋友总能制作出让人拍案惊奇的作品来。
哪里有啊 青青子衿 发表于 2022-8-30 23:21
清舟友友,你在前面,俺在后面紧紧跟着。。。飞天改命。。。。飞出去看看,没啥不可呢
好啊,先飞去会会嫦娥咋样{:4_173:} 马黑黑 发表于 2022-8-30 23:57
美美哒
一般般了 绿叶清舟 发表于 2022-8-31 19:17
是啊,手机上看是有点歪的了
电脑上看没有问题的。 绿叶清舟 发表于 2022-8-31 19:18
一般般了
一般一般,全球第三