本帖最后由 花简静 于 2025-8-27 20:55 编辑
<style>
@import 'https://638183.freep.cn/638183/web/css/tz01.css';
#pa {
--offsetX: 0px;
margin: 130px 0; left: calc(50% - 101px);width: clamp(600px, 90vw, 1700px); height: auto; aspect-ratio: 17/9;
--bg: url('https://642303.freep.cn/642303/tu/20250825md.jpg') no-repeat center/100% 100%;
--ma-size: 5%;
}
#ma {
right: 26%;
top: 82%;
background: url('https://642303.freep.cn/642303/za/xing.svg') no-repeat center/cover;
mix-blend-mode: screen;
}
#btnFs { bottom: 20px; color: #eee; border-color: currentColor; }
#msvg { position: absolute; width: 100%; height: 100%; z-index: -1; }
.cc {
opacity: .15;
offset-path: path('M -600 0, Q 0 -400, 600 180');
offset-distance: 0%;
animation:
opacity 3s var(--delay) infinite alternate var(--state),
move 150s var(--delay) linear infinite var(--state);
}
@keyframes opacity { to { opacity: 0.05; } }
@keyframes move { to { offset-distance: 100%; } }
</style>
<div id="pa">
<audio id="audio" src="https://music.163.com/song/media/outer/url?id=3078302963" autoplay loop></audio>
<div id="ma" class="opacity"></div>
<svg id="msvg" viewbox="-320 -180 640 360">
</div>
<script type="module">
import { FS } from 'https://638183.freep.cn/638183/web/js/fullscreen.js';
import Dr from 'https://638183.freep.cn/638183/web/mod/svgdr.js';
var dr = Dr.dr(msvg);
Array.from({length: 12}).forEach(() => {
var cx = Math.round(Math.random() * 310 * (Math.random() > 0.5 ? 1 : -1)),
cy = Math.round(Math.random() * 170 * (Math.random() > 0.5 ? 1 : -1)),
r = Math.ceil(Math.random() * 30 + 10),
color = '#' + Math.random().toString(16).substring(2, 8),
delay = (-20 * Math.random()).toFixed(2);
dr.circle(cx, cy, r, color).set('class', 'cc').style(`--delay: ${delay}s`);
});
FS(pa, ma);
</script>
|