我可以抱你吗 TO:走过岁月 (学习黑黑的歌词编辑)
<style>#papa { left: -344px; width: 1280px; height: 660px; top:150px; background: #ccc url('https://wj.zp68.com/lxx/yunhua/2022/09/22/500.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display: grid; place-items: center; position: relative; z-index: 1; }
#mplayer { position: absolute;left: 504px; top: 550px; width: 100px; height: 80px; user-select: none; display: grid; place-items: center; cursor: pointer; }
#mplayer:hover #btnwrap, #mplayer:hover #prog { transform: translateY(var(--yy)); }
#mplayer:hover #btnwrap { background: linear-gradient(to top right, red, green); border-radius: 50%; opacity: .75; }
#btnwrap, #prog { position: absolute; display: grid; place-items: center;transition: .5s; }
#btnwrap { --yy: -15px; width: 40px; height: 40px; transform: rotate(45deg); border: 1px solid tan; border-radius: 6px; opacity: .25; }
#btnplay { width: 20px; height: 20px; background: #eee; 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; }
#prog { --yy: 20px; width: 100px; height: 16px; border-radius: 10px; background: linear-gradient(90deg, orange, red 100%, transparent 0); border: 1px solid gray; font: normal 14px / 16px sans-serif; color: #1551C8; opacity: .75; }
#lrc { position: absolute; left: 114px;top: 570px; font: bold 1.5em sans-serif; color: transparent; letter-spacing: 2px; background: linear-gradient(-90deg, darkred, pink) 100% 100% / 200% 200%; background-clip: text; -webkit-background-clip: text; }
#mpic { position: absolute;left: 84px; top: 50px; width:width: 70%; height: 70%; opacity: .25;}
@keyframes bgMove1 { from { background-position: 0 0; } to { background-position: -100% 0; } }
@keyframes bgMove2 { from { background-position: 0 0; } to { background-position: -100% 0; } }
</style>
</head>
<body>
<div id="papa">
<img id="mpic" src="https://wj1.zp68.com:812/lxx/yunhua/2022/09/22/8.png" alt="" />
<div id="lrc">花潮lrc歌词在线</div>
<div id="mplayer">
<div id="btnwrap"><span id="btnplay"></span><span id="btnpause"></span></div>
<div id="prog">00:00 | 00:00</div>
</div>
</div>
<script>
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
let mKey = 0, mSeek = false, mFlag = true;
let aud = new Audio();
aud.src = 'https://wj.zp68.com/lxx/yunhua/2022/09/22/wkybnm.mp3';
aud.autoplay = true;
aud.loop = true;
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('seeked', () => calcKey());
aud.addEventListener('timeupdate', () => {
prog.style.background= 'linear-gradient(90deg, green, red ' + aud.currentTime / aud.duration * 100 + '%, snow 0)';
prog.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
for(j=0; j<lrcAr.length; j++) {
if(aud.currentTime >= lrcAr) {
if(mKey === j) showLrc(lrcAr);
else continue;
}
}
});
let mState = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none', lrc.style.animationPlayState = 'paused') : (btnplay.style.display = 'none', btnpause.style.display = 'block', lrc.style.animationPlayState = 'running');
let showLrc = (time) => {
lrc.style.animation = (mFlag ? 'bgMove1 ' : 'bgMove2 ') + time + 's linear forwards';
lrc.innerHTML = lrcAr;
mKey += 1;
mFlag = !mFlag;
}
let calcKey = () => {
for(j = 0; j < lrcAr.length; j ++) {
if(aud.currentTime <= lrcAr) {
mKey = j - 1;
break;
}
}
if(mKey <0) mKey = 0;
let mtime = lrcAr - (aud.currentTime - lrcAr);
showLrc(mtime);
}
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>
<br><br><br><br><br><br><br><br><br><br> @马黑黑
谢谢黑黑分享第三次歌词编辑器,我就套用玩一次 @走过岁月
谢谢岁月约会回来赶出这么多的新作品,辛苦了 @绿叶清舟
清舟你看看这个歌曲和刚才你说的那场景是不是很相配{:4_170:} 这图配的挺好的,俺也想做一个,就是懒得不想动手{:4_173:} 歌儿也好听呢{:4_185:} 醉美水芙蓉 发表于 2022-9-22 20:56
欣赏辣椒好制作!
谢谢水芙蓉欣赏{:4_171:} 千羽 发表于 2022-9-22 21:04
这图配的挺好的,俺也想做一个,就是懒得不想动手
千羽你做啊,晓得你肯定做的很漂亮的,你会图图
千羽 发表于 2022-9-22 21:04
歌儿也好听呢
哈哈~~喜欢陈宁磁性的声音好听 起个网名好难 发表于 2022-9-22 21:11
谢谢,你这个是图片{:4_199:} 做得不错,就是那两个人物抠的不是很干净,整体还是不错的 谢谢小辣椒的礼物,开心 走过岁月 发表于 2022-9-22 21:14
做得不错,就是那两个人物抠的不是很干净,整体还是不错的
哈哈~~岁月还是要求蛮高的,抠图不干净,我去加透明度 小辣椒 发表于 2022-9-22 21:10
千羽你做啊,晓得你肯定做的很漂亮的,你会图图
哈哈,心想做,手不想动{:4_205:} 走过岁月 发表于 2022-9-22 21:14
谢谢小辣椒的礼物,开心
再看看,现在是不是抠图痕迹低了一点 千羽 发表于 2022-9-22 21:16
哈哈,心想做,手不想动
做啊,期待的 小辣椒 发表于 2022-9-22 21:17
再看看,现在是不是抠图痕迹低了一点
嗯,差不多了 小辣椒 发表于 2022-9-22 21:18
做啊,期待的
嗯,给自己加点压{:4_173:}
页:
[1]
2