买辣椒也用券---起风了
<style>#papa { margin: auto; left: -100px; width: 1280px; height: 650px;top:50px; background: url('https://pic.imgdb.cn/item/65deaa599f345e8d0331e413.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; user-select: none; z-index: 1; --opt: .25; }
#papa::before { position: absolute; content: url('');left: 600px; top:400px; width: 60px; height:60px;mix-blend-mode: multiply;}
#mplayer { position: absolute; bottom: 40px; display: grid; grid-template-columns: auto auto auto; place-items: center; gap: 6px; user-select: none; }
.pMid { position: absolute; place-items: start; left: 500px;top: 100px; }
.pLeft { position: absolute; place-items: start; left: 1000px;top: 0px; }
.pLeft1 { position: absolute; place-items: start; left: 1000px;top: 280px;}
#btnplay {border-radius: 50%; width: 50px; height: 50px; cursor: pointer; animation: rot linear 3s infinite; }
#prog { --ww: 0px; width: 320px; height: 12px; border: 1px solid green; border-radius: 6px; background: snow; opacity: .65; position: relative; }
#prog::before { position: absolute; content: ''; width: var(--ww); height: 12px; border-radius: 6px; background: snow linear-gradient(90deg,OliveDrab,DarkGreen); opacity: .75; }
#audtime { font: normal 14px sans-serif; color: #3a5b16 }
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; bottom: 140px; font: bold 2.4em sans-serif; color: hsl(0,10%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 1px hsla(0,0%,0%,.95)); }
#lrc::before { position: absolute; content: attr(data-lrc); width: 20%; height: 100%; color: transparent; overflow: hidden; white-space: nowrap; background: linear-gradient(180deg,hsla(60,90%,50%,.45),hsla(60,90%,50%,.45)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(1turn); } }
</style>
<div id="papa">
<div id="lrc" data-lrc="华兰榕在线音乐">华兰榕在线音乐</div>
<div class="pMid"><img src="https://wj1.zp68.com:812/lxx/yunhua/2022/10/20/fye.gif" alt="" /></div>
<div id="mplayer">
<img id="btnplay" src="https://s1.ax1x.com/2022/09/30/xu5egK.png" alt="" />
<span id="prog"></span>
<span id="audtime">00:00 | 00:00</span>
</div>
</div>
<script>
(function() {
let aud = new Audio(), mKey = 0, mFlag = true, down = true;let lrcAr =[
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
aud.src = 'http://music.163.com/song/media/outer/url?id=1330348068.mp3';
aud.loop = true;
aud.autoplay = true;
if(aud.paused) btnplay.style.animationPlayState = 'paused';
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.addEventListener('seeked', () => calcKey());
aud.addEventListener('pause', () =>mState());
aud.addEventListener('play', () =>mState());
aud.addEventListener('timeupdate', () => {let prg = aud.currentTime * prog.offsetWidth / aud.duration < 6 ? 6 : aud.currentTime * prog.offsetWidth / aud.duration;prog.style.setProperty('--ww', prg + 'px');audtime.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);for(j=0; j<lrcAr.length; j++) {if(aud.currentTime >= lrcAr) {cKey = j;if(mKey === j) showLrc(lrcAr);else continue;}}});
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 time = lrcAr - (aud.currentTime - lrcAr);showLrc(time);};
let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrc.dataset.lrc = lrcAr;lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};
let mState = () => aud.paused ? (btnplay.style.animationPlayState='paused',lrc.style.setProperty('--state', 'paused'),papa.style.setProperty('--opt','0')) : (btnplay.style.animationPlayState='running', lrc.style.setProperty('--state', 'running'),papa.style.setProperty('--opt','.25'));
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> 我只看到了美女,没听到音乐,换了几个模式都不行呢 能看到美女,能听到音乐,
但听着不像周深的演唱哈~~{:1_292:} 欣赏一下,谢谢。 雾桥 发表于 2024-2-28 20:55
我只看到了美女,没听到音乐,换了几个模式都不行呢
问好雾桥
不知道咋回事,实在不行换电脑看吧 朵拉 发表于 2024-2-28 23:00
能看到美女,能听到音乐,
但听着不像周深的演唱哈~~
问好朵拉
还真的弄错了,这是买辣椒也用券唱的 蓝魔 发表于 2024-2-29 01:26
欣赏一下,谢谢。
问好蓝魔 平凡 发表于 2024-2-29 18:57
问好朵拉
还真的弄错了,这是买辣椒也用券唱的
原来是歌者的名字
我还不明就里
^_^
页:
[1]