换一种做法的歌词——鱼咬荷花
本帖最后由 有声有色 于 2023-4-3 15:17 编辑 <br /><br /><style>#papa { margin:0-214px ; width: 1024px; height: 600px; background: rgba(0,0,0,.45) url('https://img-baofun.zhhainiao.com/pcwallpaper_ugc/preview_jpg/7ef199de888843722d6c4690a19ee441.jpg?x-oss-process=image%2fresize%2cm_lfit%2cw_2560%2ch_1440') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display: grid; place-items: center; overflow: hidden; position: relative; z-index: 1; }
#mplayer { position: absolute; bottom: 0; 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, purple, orange); border-radius: 50%; opacity: .75;z-index: 4 }
#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: 0;z-index: 4}
#btnplay { width: 20px; height: 20px; transform: translateX(3px); background: #eee; clip-path: polygon(0 0, 0% 100%, 100% 50%); z-index: 4}
#btnpause { width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #eee; display: none;z-index: 4 }
#prog { --yy: 20px; width: 300px; height: 16px; border-radius: 10px; background: linear-gradient(90deg, orange, purple 100%, transparent 0);font: normal 14px / 16px sans-serif; color: #ff0000; text-shadow: 1px 1px 0 #000; opacity: .8; z-index: 4}
#lrcwrap { position: absolute; top: 460px; font: bold 2.4em 'KaiTi',sans-serif; z-index: 4}
#lrc1, #lrc2 { width: 100%; height: 100%; color: rgba(0,0,0,.3); white-space: nowrap; }
#lrc1{ width: 100%; height: 100%; color: #000079; white-space: nowrap;filter:drop-shadow(#FFF080 1px 0 0)drop-shadow(#FFF080 0 1px 0)drop-shadow(#FFF080 -1px 0 0) drop-shadow(#FFF080 0 -1px0);}
#lrc2 { position: absolute; top: 0px; left: 0px; color: #ff003c; overflow: hidden;filter:drop-shadow(#000080 1px 0 0)drop-shadow(#1cf688 0 1px 0)drop-shadow(#1cf688 -1px 0 0) drop-shadow(#000080 0 -1px0); }
#mpic { position: absolute; transform: rotateY(0deg); top: 0px; left: 300px; width: 400px;height: 400px; animation: rote 0.1s linear infinite; cursor: pointer; z-index: 3}
@keyframes rote {0%{opacity: 0;transform:translate(0%,0%)scale(1);}
50% {opacity: 1;filter:hue-rotate(360deg);transform:translate(0%,0%)scale(2);}
100%{opacity: 0;filter:hue-rotate(0deg);transform:translate(0%,0%)scale(5);}
}
@keyframes fly { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes mov1 { from { width: 0%;} to { width: 100%; } }
@keyframes mov2 { from { width: 0%;} to { width: 100%; } }
#vid { position: absolute; width: 1024px; height: 600px; top: 0px; object-fit: cover; opacity: 1; z-index: 2}
#vid1 { position: absolute; width: 1024px; height: 600px; top: 0px; object-fit: cover; opacity: 0.65; z-index: 2}
#disc { position: absolute; width: 100px; height: 100px; left: 30px; bottom: 30px; border:2px solid #000000;background: url(http://pan.yinhuabbs.cn/view.php/a60d7a6c4172d96080d4e23d80d9af48.png)0 0/100% 100%,conic-gradient(red,orange,yellow,green,teal,blue,#ff0000); mask: radial-gradient(transparent 7px,#red 0);-webkit-mask: radial-gradient(transparent 7px,red 0); border-radius: 50%; cursor: pointer; animation: rot 4s linear infinite; z-index: 20;transform: rotateX(45deg) rotateY(20deg) rotate(0deg);}
@keyframes rot {0% {transform: rotateX(45deg) rotateY(20deg) rotateZ(0deg);}
100% {transform: rotateX(45deg) rotateY(20deg) rotateZ(360deg);}
}
</style>
<div id="papa" data-lr="no">
<img id="mpic" alt="" src="" />
<video id="vid" src="http://txcdn1-file-m.mvbox.cn/upload/fe64d6952e3ab4a55d9d1048ca8da70f.mp4" muted="muted" autoplay="autoplay" loop="loop"></video>
<div id="lrcwrap">
<span id="lrc1"></span>
<span id="lrc2"></span>
</div>
<span id="disc"></span>
<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 mKey = 0, mFlag = true, aud = new Audio();
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
aud.src = 'https://link.hhtjim.com/163/1487512679.mp3';
aud.autoplay = true;
aud.loop = true;
disc.style.animationPlayState = aud.paused ? 'paused' : 'running';
aud.addEventListener('playing', () => disc.style.animationPlayState = 'running');
aud.addEventListener('pause', () => disc.style.animationPlayState = 'paused');
mpic.style.animationPlayState = aud.paused ? 'paused' : 'running';
aud.addEventListener('playing', () => mpic.style.animationPlayState = 'running');
aud.addEventListener('pause', () => mpic.style.animationPlayState = 'paused');
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, orange, purple ' + 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', lrc2.style.animationPlayState = 'paused') : (btnplay.style.display = 'none',
btnpause.style.display = 'block', lrc2.style.animationPlayState = 'running');
let showLrc = (time) => {
lrc2.style.animation = (mFlag ? 'mov1 ' : 'mov2 ') + time + 's linear forwards';
lrc1.innerHTML = lrc2.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> 鱼喜欢吃荷花?还不知道呢。 马小马 发表于 2023-3-25 14:33
鱼喜欢吃荷花?还不知道呢。
我也是第一次看到 这个很有创意。 这个配得歌曲是上一个帖子里的评弹呢,有趣。鱼吃荷花的视频也很奇特{:4_199:} 庶民 发表于 2023-3-25 15:28
这个很有创意。
谢谢鼓励 红影 发表于 2023-3-26 10:05
这个配得歌曲是上一个帖子里的评弹呢,有趣。鱼吃荷花的视频也很奇特
是的,主要是看看不同歌词做出来的效果 这个好玩呢,鱼吃荷花还这么的清晰{:4_199:} 谢谢有声有色的精彩分享{:4_187:} 小辣椒 发表于 2023-3-27 13:47
这个好玩呢,鱼吃荷花还这么的清晰
是啊这段视频很清晰 有声有色 发表于 2023-3-27 08:21
是的,主要是看看不同歌词做出来的效果
嗯,这个歌词同步也不错,不过前面那个更特别呢{:4_187:} 红影 发表于 2023-3-27 21:23
嗯,这个歌词同步也不错,不过前面那个更特别呢
是的,就是做起来太烦。 有声有色 发表于 2023-3-28 11:56
是的,就是做起来太烦。
虽然做起来麻烦,但是效果很好呀{:4_204:} 红影 发表于 2023-3-28 19:52
虽然做起来麻烦,但是效果很好呀
是的 有声有色 发表于 2023-3-29 08:13
是的
给人很别致的感觉{:4_204:}
页:
[1]