纳兰(学习黑黑描边文字歌词)
<style>
#papa { left: -302px; width: 1200px; height: 675px; background: url('https://pic.imgdb.cn/item/632c7c1a16f2c2beb1a15ac9.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; box-shadow: 3px 3px 20px #000; display: flex; justify-content: center; overflow: hidden; position: relative; z-index: 1; }
#papa::before {content: ''; position: absolute; width: 100%; height: 100%;opacity: .95;background:url('https://pic.imgdb.cn/item/62357b1e5baa1a80abd5d64a.gif'); }
#mplayer { position: absolute; bottom: 4px; width: 240px; 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, snow, darkgreen); opacity: 1; }
#btnwrap, #prog { position: absolute; display: grid; place-items: center; transition: .5s; }
#btnwrap { --yy: -15px; width: 40px; height: 40px; border-radius: 50%; border: 4px solid lightgreen; opacity: 0.1; }
#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: 240px; height: 18px; border-radius: 10px; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(46,139,87,.75) 70%, transparent 0); border: 1px solid lightgreen; font: normal 14px/18px sans-serif; color: snow; }
#lrc { position: absolute; top: 56px; font: bold 2.6em sans-serif; color: transparent; background: linear-gradient(-90deg, #EE6911, #EEEE11) 0 0 / 200% 200%; filter: drop-shadow(0px 0px 4px #37c1ff) drop-shadow(0px 0px 6px #37c1ff); background-clip: text; -webkit-background-clip: text; text-stroke: 1px #1F7A1F; -webkit-text-stroke: 1px #1F7A1F; }
.leaf { position: absolute; left: 60px; top: 0; width: 60px; transform: rotate(-160deg); offset-distance: 0; offset-path: path("M20 0 Q0 200, 100 200 Q340 220, 170 660"); animation: move 12s linear infinite; opacity: .4;}
@keyframes move { to { offset-distance: 100%;} }
@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>
<div id="papa">
<img class="leaf" src="https://www.huachaowang.com/data/attachment/forum/202209/16/123530ufhtrajxku4kzde9.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, mFlag = true, aud = new Audio();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.src = 'http://www.kumeiwp.com/sub/filestores/2022/09/15/6d1a38954203d99a2563d8f510043e41.mp3';
aud.autoplay = true;
aud.loop = true;
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('pause', () => mState());
aud.addEventListener('play', () => mState());
aud.addEventListener('seeked', () => calcKey());
aud.addEventListener('timeupdate', () => {
prog.style.background= 'linear-gradient(90deg, rgba(0,0,0,.45), rgba(238,238,17,.75) ' + aud.currentTime / aud.duration * 100 + '%, transparent 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;
if(mKey > lrcAr.length - 1) mKey = lrcAr.length - 1;
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> 跟着学一个,并借黑黑的枫叶一用。谢谢黑黑@马黑黑{:4_187:} 作品满满的秋意,秋林落叶、酡红如醉,这是一种丰收的艳丽,丰收的美。 红影 发表于 2022-9-23 10:11
跟着学一个,并借黑黑的枫叶一用。谢谢黑黑@马黑黑
前面有手机瞧了一眼,挺好的 梦油 发表于 2022-9-23 11:05
作品满满的秋意,秋林落叶、酡红如醉,这是一种丰收的艳丽,丰收的美。
是啊,很清净的地方,我也喜欢图图里的意境{:4_173:} 醉美水芙蓉 发表于 2022-9-23 11:31
很漂亮!
谢谢水芙蓉美女鼓励{:4_187:} 马黑黑 发表于 2022-9-23 12:10
前面有手机瞧了一眼,挺好的
我也去找的酷美的歌曲,能听到就能去做微调了{:4_173:} 红影 发表于 2022-9-23 12:21
我也去找的酷美的歌曲,能听到就能去做微调了
酷美网盘前阵子服务器崩溃一次。此类事情,酷美历史上发生过多次:免费提供服务又要维护服务器,家底不厚是比较艰难的。 挺漂亮的。好制作!{:4_199:} 画面漂亮。
-webkit-text-stroke 红影 发表于 2022-9-23 12:20
是啊,很清净的地方,我也喜欢图图里的意境
你的设计很成功啊! 好看的帖,欣赏问好!{:4_204:} 漂亮的枫叶,很有意境。{:4_187:} 马黑黑 发表于 2022-9-23 12:26
酷美网盘前阵子服务器崩溃一次。此类事情,酷美历史上发生过多次:免费提供服务又要维护服务器,家底不厚 ...
不管是不是会奔溃了,对我来说,只要音乐能听到就好{:4_173:} 加林森 发表于 2022-9-23 13:49
挺漂亮的。好制作!
谢谢队长,我就是跟着学个描边{:4_173:} 起个网名好难 发表于 2022-9-23 13:59
画面漂亮。
谢谢鼓励,套用黑黑代码玩一下{:4_173:} 梦油 发表于 2022-9-23 14:31
你的设计很成功啊!
跟在后面可以做点自己喜欢的,挺不错的{:4_173:} 梦缘 发表于 2022-9-23 15:22
漂亮的枫叶,很有意境。
这个枫叶是黑黑帖子里的,我直接借用了过来{:4_173:}
谢谢梦缘鼓励。 红影 发表于 2022-9-23 15:51
跟在后面可以做点自己喜欢的,挺不错的
一个好的厨师,只油好的食材还远远不够。