小辣椒 发表于 2023-7-14 23:14

做不到的承诺就不要对我说


<meta charset="UTF-8">
<style>
#papa { margin: auto; left: -260px;width: 1383px; height: 773px; top: 120px; background: url('https://xlaj.cn/assets/file/zp/20230714212304.gif ') 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;}
#mplayer { position: absolute; bottom: 20%;left: 900px;display: grid; grid-template-columns: auto auto auto; place-items: center; gap: 6px; user-select: none; }
#btnplay { width: 40px; height: 40px; text-align: center; font: normal 40px/40px sans-serif; color: Green; cursor: pointer; animation: rot linear 4s infinite; }
#prog { --ww: 0px; width: 200px; height: 12px; border: 1px solid green; border-radius: 8px; background: snow; opacity: .65; position: relative; }
#prog::before { position: absolute; content: ''; width: var(--ww); height: 12px; border-radius: 6px; background: snow linear-gradient(90deg, orange, green); opacity: .75; }
#audtime { font: normal 14px sans-serif; color: LimeGreen; }
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; left: 250px;top: 80px; 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(120, 80%, 50%, .55),hsla(120, 80%, 50%, .55)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
#dt1{ position: absolute; width: 334px; height: 153px; top: 455px; left: 400px; }
#dt2{ position: absolute; width: 451px; height: 254px; top: 0px; left: 0px; }
#dt3{ position: absolute; width: 25px; height: 25px; top: 320px; left: 1030px; }
#fish { position: absolute; left: 620px; top: 200px; width: 20px;offset-distance: 0;offset-path: path('M90 95a93.5 62 0 1 0 147 0a93.5 62 0 1 0 -187 0z'); offset-distance: 100%; animation: swim 25s infinite; }
#fish1 { position: absolute; left: 635px; top: 205px; width: 20px;offset-distance: 0;offset-path: path('M90 95a93.5 62 0 1 0 147 0a93.5 62 0 1 0 -187 0z'); offset-distance: 100%; animation: swim 25s infinite; }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(1turn); } }
@keyframes swim { to { offset-distance: 0%; } }
</style>
<div id="papa">
>
       <img id="dt3" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" alt="" />
      <img id="fish" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" alt="" />
      <img id="fish1" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" alt="" />
      <div id="lrc" data-lrc="童丽--往事只能回味">童丽--往事只能回味</div>
      <div id="mplayer">
                <span id="btnplay">❁</span>
                <span id="prog"></span>
                <span id="audtime">00:00 | 00:00</span>
      </div>
</div>
<script>
(function() {
      let aud = new Audio(), mKey = 0, mFlag = true;
       let lrcAr = [
                ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ];

      aud.src = 'https://xlaj.cn/assets/file/zp/20230714212215.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>
<br><br><br><br><br><br><br><br>


小辣椒 发表于 2023-7-14 23:17

那谁,发现你电脑JS代码看不见???

小辣椒 发表于 2023-7-14 23:51

我不能艾特,你就自己看看吧歌词出来的

就为你看不见JS播放器歌词、我换了个播放器

liumang 发表于 2023-7-15 00:00

是一样的歌曲那个吧,我帮你一下@admin

小辣椒 发表于 2023-7-15 00:02

liumang 发表于 2023-7-15 00:00
是一样的歌曲那个吧,我帮你一下@admin

谢谢,我不能艾特

admin 发表于 2023-7-15 00:03

小辣椒 发表于 2023-7-15 00:02
谢谢,我不能艾特
看见了,不一样的播放器:victory:

liumang 发表于 2023-7-15 20:13

小辣椒 发表于 2023-7-15 00:02
谢谢,我不能艾特

你怎么没有,那谁在欺负你;P

liumang 发表于 2023-7-17 11:06

一直想问测试2000什么?

小辣椒 发表于 2023-7-17 22:02

liumang 发表于 2023-7-17 11:06
一直想问测试2000什么?

测试2000以上的字节

liumang 发表于 2023-7-17 22:23

小辣椒 发表于 2023-7-17 22:02
测试2000以上的字节

现在可以了
页: [1]
查看完整版本: 做不到的承诺就不要对我说