冬天的雨 发表于 2024-11-12 14:00

纯音【境】 TO:小辣椒


<style>
        #mydiv { margin:130px 0 30px calc(50% - 801px); width: 1440px; height: 779px; background: url('https://file.uhsea.com/2411/3be433ab8229c9dbea05fddf121f1a75V5.jpg') no-repeat center/cover; box-shadow: 4px 4px 8px gray; z-index: 1; position: relative; --state: running; }
        #msvg { position: absolute; left: 100px; top: 20%; cursor: pointer; animation: rot 10s linear infinite var(--state); }
        #msvg polyline { stroke-dasharray: 4; stroke-dashoffset: 0; transition: 1s; animation: flash 6s linear infinite var(--state); }
        #msvg:hover polyline { stroke: white; }
        #vid { position: absolute; width: 100%; height: 100%; object-fit: cover; -webkit-mask: radial-gradient(transparent 20%, red); pointer-events: none; }
        #fsbtn { position: absolute; left: 50%; bottom: 15px; color: white; padding: 4px 6px; border: 2px solid snow; border-radius: 8px; user-select: none; cursor: pointer; transition: .5s; }
        @keyframes flash { to { stroke-dashoffset: 160; } }
        @keyframes rot { to { transform: rotate(-360deg); } }
</style>

<div id="mydiv">
        <audio id="aud" src="https://s2.ananas.chaoxing.com/sv-w9/audio/12/ce/69/dc048522041006abd3c1b5e250479ee1/audio.mp3" autoplay loop></audio>
        <video id="vid" src="https://bpic.588ku.com/video_listen/588ku_video/22/11/02/23/43/41/video6362902d0f8ad.mp4" autoplay loop muted></video>
        <svg id="msvg" width="200" height="200"></svg>
        <span id="fsbtn"></span>
</div>

<scripttype="module">
import fscreen from 'https://638183.freep.cn/638183/web/mod/fscreen.js';
import Dr from 'https://638183.freep.cn/638183/web/mod/svgdr.js';
var dr = Dr.dr('msvg');

dr.symbol('sb', '0, 0, 100, 100');
var tt = 20;
for(var i = 0; i < tt; i ++) {
        dr.polyline('30 5, 50 50, 70 5', 'none', 'BlueViolet',3).transform(`rotate(${360 / tt * i} 50 50)`).addTo('sb');
}
dr.use('#sb');

msvg.onclick = () => {
        msvg.style.setProperty('--state', ['paused','running'][+aud.paused]);
        aud.paused ? (aud.play(), vid.play(), msvg.unpauseAnimations()) : (aud.pause(), vid.pause(), msvg.pauseAnimations());
};

fscreen.fs('mydiv', 'fsbtn');

aud.play().catch(_ => dr.svg.style.setProperty('--state', 'paused'));
</script>

liumang 发表于 2024-11-12 20:45

这个特效漂亮{:5_150:}{:5_150:}

liumang 发表于 2024-11-12 20:45

小辣椒也是玩过这个音乐{:5_142:}{:5_142:}

liumang 发表于 2024-11-12 20:46

感谢冬雨分享{:5_124:}

liumang 发表于 2024-11-12 20:46

@小辣椒 收礼了

小辣椒 发表于 2024-11-14 14:00

非常喜欢的一首纯音,谢谢冬雨的礼物{:5_124:}

小辣椒 发表于 2024-11-14 14:00

我也是玩过的{:5_128:}{:5_128:}

冬天的雨 发表于 2024-11-24 16:24

小辣椒 发表于 2024-11-14 14:00
非常喜欢的一首纯音,谢谢冬雨的礼物

小辣椒看见你玩过你说喜欢我重新做的{:5_150:}

冬天的雨 发表于 2024-11-24 16:26

liumang 发表于 2024-11-12 20:46
感谢冬雨分享

谢谢,不客气{:5_128:}
页: [1]
查看完整版本: 纯音【境】 TO:小辣椒