Hayit Murat《I Can't Say》
<style>#mydiv { margin: 30px 0 30px calc(50% - 780px); width: 1400px; height:750px; background: url('https://img-baofun.zhhainiao.com/pcwallpaper_ugc/preview/5864d962445e49185bcfcc5bc48598de_preview.webp') no-repeat center/cover; box-shadow: 4px 4px 8px gray; z-index: 1; display: grid; place-items: center; position: relative; --state: running; }
#msvg { position: absolute; left: 25%; top: 28%; cursor: pointer; filter: drop-shadow(-5px -5px 10px black); animation: rot 8s linear infinite var(--state); }
#msvg:hover { filter: hue-rotate(160deg); }
#vid { position: absolute; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; -webkit-mask: radial-gradient(transparent 20%, red); pointer-events: none; }
#fsbtn { position: absolute; bottom: 15px; color: white; padding: 2px 6px; border: 2px solid snow; border-radius: 8px; user-select: none; cursor: pointer; transition: .5s; }
@keyframes rot { to { transform: rotate(360deg); } }
</style>
<div id="mydiv">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=2107662999" autoplay loop></audio>
<video id="vid" src="https://bpic.588ku.com/video_listen/588ku_video/24/04/09/15/41/16/video6614f11c2f29d.mp4" autoplay loop muted></video>
<svg id="msvg" width="300" height="300"></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');
var tt = 9, r1 = 150, r2 = 145, deg = 360 / tt, rad = Math.PI / 180 * deg, pstr = 'M150 150';
var stop = `
<stop offset="0" stop-color="green" />
<stop offset="1" stop-color="green" />
`;
for(var i = 0; i < tt; i ++) {
var x = r1 + r2 * Math.cos(rad * i), y = r1 + r2 * Math.sin(rad * i);
pstr += `A60 30 ${deg * i} 0 0 ${x.toFixed(2)} ${y.toFixed(2)}A60 30 ${deg * i} 1 0 ${r1} ${r1}`;
}
dr.gradient('radialGradient', {id: 'rg', r: .8}, stop);
dr.path(pstr, 'url(#rg)').set('fill-rule', 'evenodd');
msvg.onclick = () => {
aud.paused
? (aud.play(), vid.play(), msvg.style.setProperty('--state', 'running'))
: (aud.pause(), vid.pause(), msvg.style.setProperty('--state', 'paused'));
};
fscreen.fs('mydiv', 'fsbtn');
aud.play().catch(_ => mState());
</script> 漂亮的小播,养眼的画面,谢谢醉美版主精彩分享:) klxf 发表于 2024-11-17 11:20
漂亮的小播,养眼的画面,谢谢醉美版主精彩分享
欢迎友友光临!
页:
[1]