小辣椒 发表于 2024-10-27 21:34

努力走,别回头

<style>
    #msvg { display: block; margin: 150px 0 30px calc(50% - 630px); width: 1100px; height: 514px; box-shadow: 1px 1px 4px gray; z-index: 1; position: relative; }
    #g1 { fill: transparent; stroke: Lavender; stroke-width: 5; cursor: pointer; transform-box: fill-box; transform-origin:50% 50%; animation:rot 10s linear infinite var(--state); }
    #bg { transition: 1s; }
    @keyframes rot {to { transform: rotate(360deg); }}
</style>

<svg id="msvg" width="1100" height="514"></svg>
<audio id="aud" src="https://aod.cos.tx.xmcdn.com/storages/6f29-audiofreehighqps/51/79/GKwRIDoK8ZU3ACAAAAMkvHp9.m4a" autoplay loop></audio>
<script>
new Promise((resolve) => {
      var sc = document.createElement('script');
      sc.src = 'https://638183.freep.cn/638183/web/js2024/svgdr_trial.js';
      document.body.appendChild(sc);
      sc.onload = () => resolve();
}).then(() => {
      var dr = _dr(msvg);
      dr.image('https://file.uhsea.com/2410/80b070ec4adcc4b8fe7f9887e21f9fedY3.gif',0,0,1100,514);
      dr.image('https://638183.freep.cn/638183/web/svg/balls2.svg',650,160,250,250).id('bg');
      dr.g('g1');
      dr.ellipse(775,285,25,10).addTo('g1');
      dr.ellipse(775,285,10,25).addTo('g1');
}).then(() => {
      aud.onplaying = aud.onpause = () => mState();
      g1.onclick = () => aud.paused ? aud.play() : aud.pause();
});

mState = () => {
    g1.style.setProperty('--state', aud.paused ? 'paused' : 'running');
    bg.style.opacity = aud.paused ? 0 : 1;
}
</script>

小辣椒 发表于 2024-10-27 21:35

同一首完成

liumang 发表于 2024-10-27 22:17

小辣椒 发表于 2024-10-27 21:35
同一首完成

这个是那一首?

liumang 发表于 2024-10-27 22:30

{:5_150:}{:5_150:}{:5_150:}

liumang 发表于 2024-10-27 22:30

美女特效做的漂亮{:5_146:}
页: [1]
查看完整版本: 努力走,别回头