TO醉美水芙蓉发光音画
本帖最后由 有声有色 于 2025-9-16 13:39 编辑 <br /><br /><style>#papa { margin:0-214px ; width: 1024px; height: 600px; background: rgba(0,0,0,.45) url('https://pic1.imgdb.cn/item/663db7b90ea9cb14034d3450.gif/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="https://pic1.imgdb.cn/item/663db7b90ea9cb14034d3450.gif" />
<video id="vid" src="http://txcdn-file-m.mvbox.cn/upload/2dd190e091df68b743f49a3548da52c0.mp4" muted="muted" autoplay="autoplay" loop="loop"></video>
<div id="lrcwrap">
<span id="lrc1">花潮lrc在线</span>
<span id="lrc2">花潮lrc在线</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/222259.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> 用花潮LRC配戏剧也挺好的呢。水芙蓉收礼开心{:4_187:} 越剧。对戏剧,没能懂{:4_173:} 红影 发表于 2022-9-30 13:37
用花潮LRC配戏剧也挺好的呢。水芙蓉收礼开心
发光 下雨 下雪等在PS里很好做的 马黑黑 发表于 2022-9-30 13:42
越剧。对戏剧,没能懂
这是老家的戏,从小就听 有声有色 发表于 2022-9-30 14:20
这是老家的戏,从小就听
挺好的 有声有色 发表于 2022-9-30 13:43
发光 下雨 下雪等在PS里很好做的
我不会PS,也学不会{:4_173:} 红影 发表于 2022-9-30 20:17
我不会PS,也学不会
网上有视频教材,我也是跟着网上在学的 醉美水芙蓉 发表于 2022-9-30 20:50
老师做得漂亮!
可不要夸我了,我是照着老师的代码做的,就是PS做了个发光,谢谢老师的代码 有声有色 发表于 2022-10-1 07:52
网上有视频教材,我也是跟着网上在学的
不学了,我懒{:4_189:} 红影 发表于 2022-10-1 10:15
不学了,我懒
你那么聪明一学就会啊,节日愉快 有声有色 发表于 2022-10-1 12:06
你那么聪明一学就会啊,节日愉快
还是随心玩最好{:4_173:}
对了,看你总写OT,是不是想写TO啊? 红影 发表于 2022-10-1 16:01
还是随心玩最好
对了,看你总写OT,是不是想写TO啊?
打完字没看,现在就去改 有声有色 发表于 2022-10-1 16:53
打完字没看,现在就去改
猜想是笔误,果然{:4_173:} 红影 发表于 2022-10-1 20:10
猜想是笔误,果然
谢谢,
页:
[1]