醉美水芙蓉 发表于 2022-10-27 22:31

蓝眼泪

本帖最后由 醉美水芙蓉 于 2022-10-27 22:31 编辑 <br /><br /><style>
#papa { margin: auto; left: -340px; width: 1280px; height: 650px;top:-0px; background: url('https://s1.ax1x.com/2022/10/27/xhlsbj.png') 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: ''; background: url('https://638183.freep.cn/638183/t22/gif/122.gif'); left:350px; top: 100px; width:200px; height: 200px; border-radius: 50%; mix-blend-mode: screen; animation: rot 5s infinite; }
#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(185, 43%, 50%); -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,90%,50%,.45),hsla(120,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="花潮lrc在线">花潮lrc在线</div>
<div class="pMid"><img src="" alt="" /></div>
      
       <div class="pLeft1"><img src="" alt="" style="width: 65px; height: 64px; mix-blend-mode: multiply; transform: rotate(-60deg);" /></div>
      <div id="mplayer">
                <img id="btnplay" src="https://s1.ax1x.com/2022/10/27/xh3zEd.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 = 'https://www.qqmc.com/up/kwlink.php?id=39088679&.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>

红影 发表于 2022-10-27 22:42

这个旋转动图和背景配合得特别好。欣赏水芙蓉美贴{:4_187:}

醉美水芙蓉 发表于 2022-10-28 06:36

红影 发表于 2022-10-27 22:42
这个旋转动图和背景配合得特别好。欣赏水芙蓉美贴

谢谢红影美女光临支持!

马黑黑 发表于 2022-10-28 07:01

不错的创意,效果杠杠的

樵歌 发表于 2022-10-28 11:01

很漂亮{:4_204:}

醉美水芙蓉 发表于 2022-10-28 11:45

马黑黑 发表于 2022-10-28 07:01
不错的创意,效果杠杠的

谢谢黑黑老师光临指导!

醉美水芙蓉 发表于 2022-10-28 11:45

樵歌 发表于 2022-10-28 11:01
很漂亮

问候樵歌,谢谢光临支持!

马黑黑 发表于 2022-10-28 11:53

醉美水芙蓉 发表于 2022-10-28 11:45
谢谢黑黑老师光临指导!

{:4_190:}

大猫咪 发表于 2022-10-28 15:10

老歌经典!制作唯美, 真棒!欣赏水芙蓉美贴! 问好!

{:4_204:}{:4_199:}

樵歌 发表于 2022-10-28 16:57

醉美水芙蓉 发表于 2022-10-28 11:45
问候樵歌,谢谢光临支持!

美女不必客气嘛{:4_204:}

醉美水芙蓉 发表于 2022-10-28 17:30

大猫咪 发表于 2022-10-28 15:10
老歌经典!制作唯美, 真棒!欣赏水芙蓉美贴! 问好!

喵咪好久不见,谢谢光临支持!

红影 发表于 2022-10-28 20:45

醉美水芙蓉 发表于 2022-10-28 06:36
谢谢红影美女光临支持!

客气了,问好芙蓉美女{:4_187:}
页: [1]
查看完整版本: 蓝眼泪