|
|

楼主 |
发表于 2026-7-31 13:09
|
显示全部楼层
帖子代码
- <style>
- @import 'https://638183.freep.cn/638183/web/api/audioplayer.css';
- .pa { --offsetX: 81px; --bg: url('https://638183.freep.cn/638183/t24/w8/ca.webp') no-repeat center/cover; color: tan; }
- .player { width: 480px; bottom: 10px; }
- .btnFs { top: 25px; right: 20px; }
- .pd-vid { opacity: 1; mix-blend-mode: screen; }
- .bl { width: 60px; transform: rotate(90deg); animation: offset-distance 2s forwards; }
- #player1 { position: absolute; top: 70px; width: 80px; height: 80px; }
- </style>
- <div id="pa" class="pa">
- <video class="pd-vid" src="https://img2.tukuppt.com/video_show/2414777/00/01/61/5b46fac6a7c49.mp4" autoplay loop muted></video>
- <div id="player1"></div>
- </div>
- <script>
- var options = {
- pa: '.pa',
- urls: [['https://music.163.com/song/media/outer/url?id=1991802530', '战役']],
- btns: [player1],
- };
- loadJs('https://638183.freep.cn/638183/web/api/audioplayer.min.js', tzRun);
- function tzRun() {
- var aud = new AudPlayer(options);
- const frg = new DocumentFragment(), num = 5;
- for (let i = 0; i < num; i++) {
- const img = document.createElement('img');
- img.src = 'https://638183.freep.cn/638183/small/2026/bullet.png';
- img.alt = '';
- img.className = 'bl';
- img.style.offsetPath = `ray(${360 / num * i}deg)`;
- img.style.animationDelay = i + 1 + 's';
- if (i === num - 1) img.onanimationend = () => player1.classList.add('rot');
- frg.appendChild(img);
- }
- player1.appendChild(frg);
- }
- function loadJs(url, callback) {
- var script = document.createElement('script');
- script.charset = 'utf-8';
- script.src = url;
- script.onload = function() {
- if (callback) callback();
- };
- document.head.appendChild(script);
- }
- </script>
复制代码
|
|