2024年9月16日 星期一
<style>
#mydiv { margin: 30px 0 30px calc(50% - 730px); width: 1280px; height: 720px; background: url('https://638183.freep.cn/638183/web/svg/balls1.svg') repeat-x 0 5% / 25% 25%, url('https://638183.freep.cn/638183/t24/webp2/ytlds.webp') center/cover; z-index: 1; box-shadow: 03px 3px 6px #333; display: grid; place-items: center; animation: hue-rot 10s linear infinite alternate var(--state); position: relative; }
#player { position: absolute; width: 200px; height: 200px; border-radius: 50%; top: 20px; filter: drop-shadow(-400px 200px 0 silver) drop-shadow(400px 200px 0 silver); cursor: pointer; transition: .5s; }
@keyframes hue-rot { to { filter: hue-rotate(360deg); } }
</style>
<div id="mydiv">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=2625047869" autoplay loop></audio>
<img id="player" src="https://638183.freep.cn/638183/web/svg/rotc.svg" alt="" title="播放/暂停" />
</div>
<script>
var sc = document.createElement('script');
sc.src = 'https://638183.freep.cn/638183/web/js2024/fscreen.js';
sc.charset = 'utf-8';
document.body.appendChild(sc);
sc.onload = () => FS({papa: '#mydiv', scale: [player], css: 'bottom: 20px; --fsBg: #eeeeee90; --color: #336699;'});
aud.onplaying = aud.onpause = () => mydiv.style.setProperty('--state', aud.paused ? 'paused' : 'running');
player.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>
|