非常开心 发表于 2023-10-4 20:26

【画笔似有马良功】情人

<style>
#papa {
      margin: 0 0 0 calc(50% - 523px);
      width: 1000px;
      height:1200px;
      background: teal url('https://5b0988e595225.cdn.sohucs.com/images/20190808/8ccb638e567247f5a0002b5efeb0dfe6.gif ') no-repeat center/cover;
      box-shadow: 8px 6px 18px rgba(0,0,0,.35);
      border-radius: 8px;
      position: relative;
      z-index: 1;
}
#mplayer {
--state: paused;
      --angle:360deg;
      width: 280px;
      height: 280px;
      top: 100px;
      left: 700px;      
      background: url('http://bohann.net/data/attachment/forum/202308/22/130659g6uu1qitf6buz26g.jpg') no-repeat center/cover;
      border-radius: 0%;
      display: grid;
      place-items: center;
      cursor: pointer;
      position: absolute;
}


</style>

<div id="papa">
      <div id="mplayer">
                <span id="circle"></span>
      </div>
</div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=77153.mp3" autoplay loop></audio>

<script>
(function(mkFS) {let setFullScreen = (user_set) => {let pa = user_set.pa;if(typeof(pa) !== 'object') return false;if(!user_set.set) user_set.set = 'color: snow; background: black; border: 2px solid snow; left: 40px; bottom: 40px;';btnMsg = document.createElement('span');btnMsg.style.cssText = `position: absolute; border-radius: 8px; padding: 4px; cursor: pointer; z-index:998; ${user_set.set}`;btnMsg.innerText = '全屏观赏';btnMsg.style.display = 'none';pa.appendChild(btnMsg);let timerId, fs = false;btnMsg.onclick = () => fs ? document.exitFullscreen() : pa.requestFullscreen();pa.addEventListener('mousemove', (e) => {clearTimeout(timerId);btnMsg.style.display = 'block';timerId = setTimeout('btnMsg.style.display = "none"', 3000);});document.addEventListener('fullscreenchange', () => {if (document.fullscreenElement !== null) {fs = true;btnMsg.innerText = '退出全屏';} else {fs = false;btnMsg.innerText = '全屏观赏';}});};mkFS.FS = setFullScreen;})(this);
let mState = () => mplayer.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('play', () => mState());
aud.addEventListener('pause', () => mState());
mplayer.addEventListener('click', () => aud.paused ? aud.play() : aud.pause());

FS({
      pa: papa,
      set: 'color: snow; background: transparent; border: 2px solid snow; top: 180px;left:60px',
});

</script>

蜻蜓 发表于 2023-10-4 20:39

首席欣赏{:10_402:}

一抹微蓝 发表于 2023-10-4 20:54

闪闪的俩人,真好看
页: [1]
查看完整版本: 【画笔似有马良功】情人