|
<style>
@import 'https://638183.freep.cn/638183/web/css/tz01.css';
#pa { --offsetX: 81px; --bg: tan url('https://638183.freep.cn/638183/t24/w6/kalos.webp') no-repeat center/cover; }
#progress { position: absolute; bottom: 40px; width: 15vw; height: 15vw; transition: .4s; }
#prog, #track { fill: none; stroke: url(#grd1); stroke-width: 16; stroke-opacity: .7; stroke-linecap: round; stroke-linejoin: round; transition: .15s; cursor: pointer; }
#prog { stroke: snow; }
#g1 { animation: unset; cursor: pointer; }
#btnFs { bottom: 20px; color: snow; border-color: currentColor!important; }
.circle { transform-box: fill-box; transform-origin: center; fill: transparent; stroke: url(#grd1); stroke-width: 10; stroke-opacity: .7; animation: rot var(--duration) linear infinite var(--state); }
@keyframes rot { to { transform: rotate(-360deg); } }
</style>
<div id="pa">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=28483419" autoplay loop></audio>
<video class="pd-vid" src="https://img.tukuppt.com/video_show/2269348/00/14/64/5e593f4b8ab37.mp4" autoplay loop muted></video>
<svg id="progress" xmlns="http://www.w3.org/2000/svg" viewBox="-200 -200 400 400">
<g id="g1" class="sepia"><title>ALT+X</title></g>
<g id="g2"><title>调节进度</title></g>
</svg>
</div>
<script type="module">
import { FS } from 'https://638183.freep.cn/638183/web/js/pathprog.js';
import Dr from 'https://638183.freep.cn/638183/web/mod/svgdr.mod.js?v=1.0';
var dr = Dr.dr(progress);
var rs = [{cx: -100, cy: -100}, {cx: 0,cy: 0}, {cx: 100, cy: -100}];
var grdSet = {id: 'grd1', x1: 0, x2: 0, y1: 0, y2: 1};
var stopAr = [['red',0], ['green',.5], ['orange',1]];
dr.gradient('linearGradient', grdSet, stopAr);
rs.forEach((r,k) => {
var du = ((Math.random() * 20 + 20) / 10).toFixed(2);
dr.circle(r.cx, r.cy, 90).sets({class: 'circle', style: `--duration: ${du}s`}).addTo(g1);
});
dr.path('M-190 0 Q0 300,190 0').id('track').addTo(g2);
dr.path('M-190 0 Q0 300,190 0').id('prog').addTo(g2);
FS(pa, g1);
</script>
|