|
|

楼主 |
发表于 2024-2-13 20:41
|
显示全部楼层
帖子代码
- <style>
- #papa { margin: 0 0 0 calc(50% - 593px); width: 1024px; height: 640px; background: url('https://638183.freep.cn/638183/t24/jpg/wwmw1.jpeg') no-repeat center/cover, url('https://638183.freep.cn/638183/t24/jpg/wfmw0.jpeg') no-repeat center/cover, radial-gradient(transparent, blue); background-blend-mode: screen, saturation; filter: brightness(.5); box-shadow: 3px 3px 20px #000; position: relative; overflow: hidden; z-index: 1; animation: bright 25s linear infinite alternate var(--state); pointer-events: none; }
- #papa::before { position: absolute; content: ''; width: 200px; height: 200px; background: url('https://638183.freep.cn/638183/t24/jpg/wwmw1.jpeg') no-repeat center/cover; box-shadow: inset 0 0 18px lightblue; opacity: .9; border-radius: 50%; left: calc(50% - 100px); top: 20px; animation: rot 5s linear infinite var(--state); cursor: pointer; pointer-events: auto; }
- #papa img { position: absolute; top: 420px; left: 52%; mix-blend-mode: multiply; filter: blur(.5px) opacity(.9); }
- #papa img:nth-of-type(2) { transform: translate(0, 110px) scale(1,-1); filter: blur(2px); }
- @keyframes bright { to { filter: brightness(1.3); } }
- @keyframes rot { to {transform: rotate(1turn); } }
- </style>
- <div id="papa">
- <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1430643126" autoplay loop></audio>
- <img src="https://638183.freep.cn/638183/Pic/81/bird7.gif" alt="" />
- <img src="https://638183.freep.cn/638183/Pic/81/bird7.gif" alt="" />
- </div>
- <script>
- var mState = () => papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
- aud.addEventListener('playing', mState);
- aud.addEventListener('pause', mState);
- papa.onclick = () => aud.paused ? aud.play() : aud.pause();
- </script>
复制代码
|
|