宁静 发表于 2022-10-1 13:28

纯音欣赏---论坛的朋友们国庆节快乐!

本帖最后由 宁静 于 2022-10-4 16:51 编辑 <br /><br /><style>
#papa { left: -200px; width: 1280px; height: 750px; top: 150px; background: gray url('https://pan.doliy.cn/filestores/2022/10/04//834d3085d055e0a82860b14026a7b424.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display:grid; place-items: center; user-select: none; overflow: hidden; position: relative; z-index: 1; }
#mplayer { position: absolute; bottom: 50px; right: 300px; width: fit-content; height: fit-content; display: flex; align-items: center; gap: 8px; z-index: 9; }
#btnwrap { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #ccc linear-gradient(to top right, rgba(255,0,0,.75), rgba(0,255,0,.75)); cursor: pointer; }
#btnwrap:hover { background: #000 linear-gradient(to top right, rgba(255,0,0,.75), rgba(0,255,0,.75)); }
#btnplay { width: 20px; height: 20px; background: #ccc; clip-path: polygon(0 0, 0% 100%, 100% 50%); }
#btnpause { width: 2px; height: 20px; border-style: solid; border-width: 0px 4px; border-color: transparent #eee; display: none; }
#prog { width: 500px; height: 2px; background: #ccc linear-gradient(to right,red,orange,green,tomato) no-repeat; background-size: 1px 2px; cursor: pointer; position: relative;}
#prog::before { position: absolute; content: ''; top: -7px; width: inherit; height: 15px; }
#prog:hover::before { background: rgba(0,200,200,.15); }
#tmsg { font: normal 16px sans-serif; color: lightblue;}
#lrc { position: absolute; left: 470px; bottom: 300px; font: bold 2em sans-serif; color: Yellow; text-shadow: 1px 1px 2px #000; text-align: center; }
#lrc:hover, #tmsg:hover { color: snow; }
#vid { position: absolute; width: 1280px; height: 755px; top: -5px; object-fit: cover; opacity: 0.75; }
#dt{ position: absolute; width: 544px; height: 333px; top: -20px; left: 650px; }
</style>

<div id="papa">

      <img id="dt" src="https://pan.doliy.cn/filestores/2022/10/04//ab42b24f74d8c1880aa6ff186c240529.gif" alt="" />
      <video id="vid" src="https://wj.zp68.com/lxx/yunhua/2022/09/24/24.mp4" muted="muted" autoplay="autoplay" loop="loop"></video>
      <div id="mplayer"><span id="btnwrap"><span id="btnplay"></span><span id="btnpause"></span></span><span id="prog"></span><span id="tmsg">00:00 | 00:00</span></div>
      <div id="lrc">纯音欣赏---我爱你中国</div>
</div>

<script>
let lrcAr = [
                ['0.00','纯音欣赏---我爱你中国'],
       
                ['60.00','纯音欣赏---我爱你中国'],
       
        ['250.82','纯音欣赏---我爱你中国']
];
let aud = new Audio();
aud.src = 'https://pan.doliy.cn/filestores/2022/10/04//863c48a814e71fcbb275ea4fed44baba.mp3';
aud.autoplay = true;
aud.loop = true;
btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
aud.addEventListener('pause', () => btnstate());
aud.addEventListener('play',() => btnstate());
aud.addEventListener('timeupdate', () => {
      prog.style.backgroundSize = prog.offsetWidth * aud.currentTime / aud.duration + 'px 2px';
      tmsg.innerText = toMin(aud.duration) + ' | ' + toMin(aud.currentTime);
      for(j=0; j<lrcAr.length; j++) {
                if(aud.currentTime >= lrcAr) lrc.innerText = lrcAr;
      }
});
let btnstate = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none') : (btnplay.style.display = 'none', btnpause.style.display = 'block');
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><br><br>

宁静 发表于 2022-10-1 13:30

祝大家国庆节快乐!{:10_402:}

沉默 发表于 2022-10-1 15:00

宁静 发表于 2022-10-1 13:30
祝大家国庆节快乐!

国庆快乐{:10_402:}

沉默 发表于 2022-10-1 15:04

祝福祖国繁荣昌盛

苏三月 发表于 2022-10-1 19:27

本帖最后由 苏三月 于 2022-10-1 19:29 编辑

在悠扬婉转的琴声中祝福我们亲爱的的祖国繁荣富强{:10_402:}

苏三月 发表于 2022-10-1 19:31

宁静 发表于 2022-10-1 13:30
祝大家国庆节快乐!

宁静,节日快乐,天天开心{:10_408:}

撒哈拉的雨 发表于 2022-10-1 21:28

特别振奋人心的一首曲子{:10_402:}

撒哈拉的雨 发表于 2022-10-1 21:29

苏三月 发表于 2022-10-1 19:27
在悠扬婉转的琴声中祝福我们亲爱的的祖国繁荣富强

三月晚上好

撒哈拉的雨 发表于 2022-10-1 21:30

一起祝福,国庆节快乐!

苏三月 发表于 2022-10-1 22:33

撒哈拉的雨 发表于 2022-10-1 21:29
三月晚上好

撒雨来了,节日开心快乐{:10_402:}
页: [1] 2 3
查看完整版本: 纯音欣赏---论坛的朋友们国庆节快乐!