宁静 发表于 2023-5-3 18:07

胭脂扣 演唱:梅艳芳 帖赠:夏如夕

本帖最后由 宁静 于 2023-5-6 22:57 编辑 <br /><br /><style>
#papa { margin: auto;left: -290px;top:150px;width: 1433px; height: 717px; background: silver url('https://pic2.imgdb.cn/item/64566a010d2dde57773b9f37.gif ') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; display: grid; grid-template-rows: repeat(2, 4fr) 1fr; grid-template-columns: repeat(3, 1fr); grid-template-areas: '. . top' 'mid mid mid' 'foot foot foot'; user-select: none; z-index: 1; }
#papa > div { position: relative; display: grid; }

.pMid { grid-area: mid; place-items: end center; }
.pFoot { grid-area: foot; place-items: center; }
#mplayer { position: absolute; width: 400px; height: 60px; font: normal 14px sans-serif; z-index: 9; }
#mplayer::before, #mplayer::after { position: absolute; width: 100%; height: 50%; color: snow; margin: 15px 0; }
#mplayer::before { content: attr(data-cur); }
#mplayer::after { content: attr(data-dur); text-align: right; }
#btnplay { position: absolute; left: calc(50% - 15px); bottom: 25px; width: 30px; height: 30px; border-radius: 50%; background: green url('https://638183.freep.cn/638183/t22/webp/lotus.webp') no-repeat; cursor: pointer; z-index: 2; animation: rot linear 4s infinite; }
#prog { --posX: 0px; position: absolute; bottom: 10px; width: 100%; height: 1px; background: #eee; cursor: pointer; }
#prog::before, #prog::after { position: absolute; content: ''; left: 0; }
#prog::before { width: var(--posX); height: 1px; background: red; }
#prog::after { left: var(--posX); top: calc(50% - 5px); width: 3px; height: 10px; background: silver; }
#tit { position: absolute; bottom: 20px; right: 30px; font: bold 3em sans-serif; color: snow; text-shadow: 2px 2px 3px #212121; }
#lrc { --motion: cover1; --tt: 1s; --state: paused; position: absolute; font: bold 2.4em sans-serif; color: hsl(240,100%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 2px hsla(0,100%,0%,.85)); }
#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,30%,50%,.75),hsla(120,100%,50%,.65)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }

#dt{ position: absolute; width: 57px; height: 169px; top: 140px; left: 600px; }
#dt1{ position: absolute; width: 32px; height: 21px; top: 150px; left: 450px; }

@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">

<img id="dt" src="https://pic2.imgdb.cn/item/64566a640d2dde57773c1483.png" alt="" />
<img id="dt1" src="https://wj.zp68.com/lxx/yunhua/2023/04/14/xx.jpg" alt="" />
   <div class="pTop"><img src=" " alt="" style="mix-blend-mode: multiply;" /></div>

      <div class="pMid"><span id="lrc" data-lrc="HCPlayer">HCPlayer</span></div>
      <div class="pFoot">
                <div id="mplayer" data-cur="00:00" data-dur="00:00"><span id="prog"></span><span id="btnplay"></span></div>
      </div>
</div>

<script>
(function() {
      let mKey = 0, mFlag = true, aud = new Audio();
      aud.src = 'https://aod.cos.tx.xmcdn.com/storages/c95d-audiofreehighqps/53/85/GKwRIRwH9grkABBDQgIHMKBK.m4a';
      let lrcAr =[ ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ];
      aud.autoplay = true;
      aud.loop = true;
      if (aud.paused) btnplay.style.animationPlayState = 'paused';
      btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
      mplayer.onmousemove = (e) => {mplayer.style.cursor = e.offsetY > mplayer.offsetHeight / 1.5 ? 'pointer' : 'default';}
      mplayer.onclick = (e) => {if (e.offsetY > mplayer.offsetHeight / 1.5) 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.setProperty('--posX', prog.offsetWidth * aud.currentTime / aud.duration + 'px');mplayer.dataset.cur = toMin(aud.currentTime);mplayer.dataset.dur = 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.animationPlayState = 'paused', lrc.style.setProperty('--state', 'paused')) : (btnplay.style.animationPlayState = 'running', lrc.style.setProperty('--state', 'running'));
      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 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 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; };
      papa.oncontextmenu = () => false;
})();
</script>
<br><br><br><br><br><br><br><br><br><br>

宁静 发表于 2023-5-3 18:09

@夏如夕

夕夕~~谢谢你的精彩图图,宁静不会做图就送首梅艳芳的老歌,希望你喜欢

沉默 发表于 2023-5-3 20:20

经典老歌,百听不厌

沉默 发表于 2023-5-3 20:24

露个脸就下

沉默 发表于 2023-5-3 20:24

夏如夕收礼开心

楚心兰 发表于 2023-5-3 21:07

手机也能欣赏!
很喜欢的一首歌,蹭听啦!
如夕收礼开心!{:10_402:}

宁静 发表于 2023-5-3 21:42

沉默 发表于 2023-5-3 20:20
经典老歌,百听不厌

是的,经典老歌也是好听

宁静 发表于 2023-5-3 21:44

楚心兰 发表于 2023-5-3 21:07
手机也能欣赏!
很喜欢的一首歌,蹭听啦!
如夕收礼开心!

谢谢心兰欣赏,我现在发的帖全部可以手机欣赏,只是有的手机要手动播放,点击播放器按钮才可以欣赏

墨羽 发表于 2023-5-3 22:00

这首歌不熟悉,但是好听,声音熟悉,先醉一会!

夏如夕 发表于 2023-5-3 22:14

宁静 发表于 2023-5-3 18:09
@夏如夕

夕夕~~谢谢你的精彩图图,宁静不会做图就送首梅艳芳的老歌,希望你喜欢 ...

来了,谢谢静儿宝。。精彩的一帖。。喜欢呢
页: [1] 2 3 4
查看完整版本: 胭脂扣 演唱:梅艳芳 帖赠:夏如夕