你的万水千山 (DJ沈念版)TO:黑黑
<style>#papa { left: -400px; width: 1400px; height: 750px; top:150px; background: #ccc url('400X.png') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display: grid; place-items: center; position: relative; z-index: 1; }
#mplayer { position: absolute; left: 800px; top: 670px; width: 300px; 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: 300px; 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; top: 300px;left: 700px; font: bold 2.8em sans-serif;font-family:汉仪雪峰体简; filter:drop-shadow(#FFFfff 1px 0 0)drop-shadow(#FFFfff 0 1px 0)drop-shadow(#FFFfff -1px 0 0) drop-shadow(#FFFfff 0 -1px0);color: transparent; letter-spacing: 2px; background: linear-gradient(50deg, #000080, #ff0000, #000000, #00f000) 100% 100% / 200% 200%; background-clip: text; -webkit-background-clip: text; }
#plane1{position: absolute;left: 60px;top: 0;width: 100px;offset-distance: 0;offset-path: path("M0 20 Q300 80, 700 350 T1320 100");animation: move 8s linear infinite;}
#plane {position: absolute;left: 60px;top: 0;width: 100px;offset-distance: 0;offset-path: path("M0 50 Q400 160, 800 450 T1320 100");animation: move 8s linear infinite;}
#ship { position: absolute; width: 100%; height: 100%; object-fit: cover; }
@keyframes bgMove1 { from { background-position: 0 0; } to { background-position: -100% 0; } }
@keyframes bgMove2 { from { background-position: 0 0; } to { background-position: -100% 0; } }
@keyframes move { to { offset-distance: 100%;} }
</style>
<div id="papa">
<video id="ship" src="https://wj.zp68.com/lxx/yunhua/2022/09/19/ndwsqs.mp4" muted="muted" autoplay="autoplay" loop="loop"></video>
<img id="plane1" src="https://wj.zp68.com/lxx/yunhua/2022/09/19/fj.png" alt="" />
<img id="plane" src="https://wj.zp68.com/lxx/yunhua/2022/09/19/fj.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/19/ndwsqs.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><br><br> @马黑黑
谢谢黑黑的教程分享 黑黑我飞机不上去感觉画面不够灵动,干脆加了2个{:4_170:} 黑黑这个歌词你看看要不要再大一点?我已经改到2.8的 漂亮 好看{:5_116:} 风中飞尘 发表于 2022-9-19 12:54
漂亮 好看
谢谢小风支持{:4_187:} 厉害厉害,越来越漂亮了。{:4_199:} 辣椒制作得漂亮。{:4_199:}{:4_199:} lrc的样式修改的很漂亮 小辣椒 发表于 2022-9-19 12:34
黑黑我飞机不上去感觉画面不够灵动,干脆加了2个
可以的,比翼双飞{:4_170:} 小辣椒 发表于 2022-9-19 12:38
黑黑这个歌词你看看要不要再大一点?我已经改到2.8的
可以的可以的,按自己的意思去做就好。 除了调整歌词和小飞机,这个频谱也很给力,亲爱的太棒了{:4_199:} 小辣椒朋友下午好!欣赏精巧的制作,新潮的画面。赞! 加林森 发表于 2022-9-19 13:06
厉害厉害,越来越漂亮了。
队长晚上好{:4_187:} 红芍药 发表于 2022-9-19 13:10
辣椒制作得漂亮。
谢谢芍药欣赏{:4_171:} 马黑黑 发表于 2022-9-19 13:18
lrc的样式修改的很漂亮
以前就做过这个歌词的 马黑黑 发表于 2022-9-19 13:18
可以的,比翼双飞
哈哈~~是的是准备一起比翼双飞{:4_189:} 红影 发表于 2022-9-19 16:19
除了调整歌词和小飞机,这个频谱也很给力,亲爱的太棒了
这种视频我不会经常玩,手机有的人看不见的,微信不能用 醉美水芙蓉 发表于 2022-9-19 17:46
屏谱漂亮!欣赏辣椒精彩制作!
谢谢水芙蓉欣赏{:4_171:}