纯音乐---莫等待
<style>
#mydiv { margin: 140px 0 30px calc(50% - 721px); width: 1280px; height: 689px; background: url(' https://v.djqq.net/tttdj/upfile/20240916155645.gif') center/cover; box-shadow: 03px 3px 6px #333; display: grid; place-items: center; position: relative; }
#svg1 { position: absolute; top: 10%; right: 12%; cursor: pointer; filter: hue-rotate(0deg) drop-shadow(0 0 1px black); transition: 1s; }
#svg1:hover { filter: hue-rotate(200deg) drop-shadow(0 0 4px black); }
</style>
<div id="mydiv">
<audio id="aud" src="https://v.djqq.net/tttdj/upfile/20240916155723.mp3" autoplay loop></audio>
<svg id="svg1" width="100" height="100" viewBox="0 0 200 200" fill="none" stroke="white" stroke-width="6" stroke-dasharray="6 12 6"></svg>
</div>
<script>
var ww = mydiv.offsetWidth;
var sc = document.createElement('script');
sc.src = 'https://638183.freep.cn/638183/web/api/fullscreen.js';
sc.charset = 'utf-8';
document.body.appendChild(sc);
sc.onload = () => FS({papa: '#mydiv', css: 'bottom: 20px; --fsBg: #00000090; --color: #336699;'});
var observer = new ResizeObserver((elms) => {
var cr = elms.contentRect;
svg1.style.transform = `scale(${cr.width / ww * 1.2})`;
});
mState = () => aud.paused ? (tz.style.setProperty('--state', 'paused'), hsvg.pauseAnimations()) : (tz.style.setProperty('--state', 'running'), hsvg.unpauseAnimations());
drawCircles = (num) => {
let circlecode = '', anicode = '';
Array(num).fill(0).forEach((c,k) => {
c = k + 1;
let bstr = k > 0 ? `ani${k}.begin+${k * 3 / num}s` : '0s';
let color = `#${Math.random().toString(16).substring(2,8)}a0`;
circlecode += `<circle id="cc${c}" cx="100" cy="100" r="0" stroke="${color}" transform="rotate(${360 / num * k} 100 100)"></circle>`;
anicode += `<animate xlink:href="#cc${c}" attributeName="r" values="0;90;0" dur="20s" repeatCount="indefinite" id="ani${c}" begin="${bstr}"></animate>`;
});
return circlecode + anicode;
};
svg1.innerHTML = drawCircles(10);
observer.observe(mydiv);
aud.onplaying = aud.onpause = () => aud.paused ? svg1.pauseAnimations() : svg1.unpauseAnimations();
svg1.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>
圆里面这个就是音频{:5_150:}{:5_150:} 感谢分享{:5_124:}
页:
[1]