《听闻远方有你》 - 祝女神们节日快乐!(套用奶奶老师代码)
本帖最后由 亦是金 于 2024-3-8 18:27 编辑 <br /><br /><style>#mydiv {
margin: 50px 0 0 calc(50% - 681px);
width: 1200px;
height: 700px;
border: 6px solid rgba(36, 201, 219,.95);
border-radius: 20px;
background: url('https://z4a.net/images/2023/10/07/1005f.gif') no-repeat center/cover;
box-shadow: 3px 3px 8px #000, 0 0 0 2px silver;
overflow: hidden;
z-index: 1;
position: relative;
}
#player {
position: absolute;
left: 250px;
top: 580px;
width: 80px;
height: 80px;
transition: 3s;
filter: invert(.1) drop-shadow(0 0 24px yellow);
cursor: pointer;
animation: rot 5s linear infinite var(--state);
}
#vid {
position: absolute;
bottom: 0;
width: 100%;
height: calc(100% + 100px);
object-fit: cover;
pointer-events: none;
mix-blend-mode: screen;
}
@keyframes rot { to { transform: rotate(360deg); } }
#bjtp{
position: absolute;
top: 87%;
left: 76%;
width: 23%;
height: 15%;
z-index:3;
}
li-zi {
position: absolute;
width: 40px;
height: 40px;
background: url('https://z4a.net/images/2024/01/14/xin40.png');
animation: moving var(--du) var(--de) infinite linear var(--state);
}
@keyframes moving {
from { transform: translate(100,0) rotate(var(--deg)); opacity: 0; }
to { transform: translate(var(--xx),var(--yy)) rotate(var(--deg)); opacity: 1; }
}
@keyframes rot { to { transform: rotate(360deg); } }
</style>
<div id="mydiv">
<div id="bjtp"><img id="Img" src="https://ysj147.s3-us-east-1.ossfiles.com/zzsc/png/ysjzxyy.png" width="100%" height="100%"></div>
<video id="vid" src="https://img.tukuppt.com/video_show/2269348/00/14/66/5e5a2fd36a145.mp4" loop muted></video>
<audio id="aud" src="http://chuangshicdn.data.mvbox.cn/music/fc/21/12/05/21120521281783642296.mp3" autoplay loop></audio>
<img id="player" src="https://ysj147.s3-us-east-1.ossfiles.com/zzsc/png/anniu11.png" alt="" />
</div>
<script>
(function() {
let total = 20;
Array.from({length: total}).forEach((lz,key) => {
lz = document.createElement('li-zi');
let hudu = Math.PI / 180 * 360 / total * key;
let xx = 800 * Math.cos(hudu), yy = 800 * Math.sin(hudu);
lz.style.cssText += `
--xx: ${xx}px;
--yy: ${yy}px;
--deg: ${360 / total * key}deg;
--du: ${4 + Math.random() * 10}s;
--de: -${Math.random() * 3}s;
`;
mydiv.prepend(lz);
});
let mState = () => mydiv.style.setProperty('--state', aud.paused ? 'paused' : 'running');
aud.addEventListener('pause', () => mState());
aud.addEventListener('playing', () => mState());
mypic.onclick = () => aud.paused ? aud.play() : aud.pause();
})();
</script>
<script>
let sFile = document.createElement('script');
sFile.src = 'https://ysj147.s3-us-east-1.ossfiles.com/zzsc/js/lrc-ysj.js';
sFile.charset = 'utf-8';
document.head.appendChild(sFile);
sFile.onload = () => {
LRC({
papa: '#mydiv',
lrcAr: geci,
btn: '#player',
lrc_css: (`bottom: 60px; left: 430px; color: rgba(255,255,255,.9); --bg: url('https://z4a.net/images/2024/01/14/auewj-fb7cv.jpg'); font-size: 2.8em;`)
});
};
let geci = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
</script>
<script>
(function() {
let timer = null, sF = document.createElement('script');
sF.src = 'https://638183.freep.cn/638183/web/api/fullscreen.js';
sF.charset = 'utf-8';
document.querySelector('body').appendChild(sF);
sF.onload = () => FS({papa: '#mydiv'});
mydiv.onmousemove = function(e) {
clearTimeout(timer);
timer = setTimeout(function() {
if(e.target.id === 'player') return;
let x = e.offsetX, y = e.offsetY, sw = player.offsetWidth;
if(x < 0) x = 0;
if(x > mydiv.offsetWidth - sw) x = mydiv.offsetWidth - sw;
if(y < 0) y = 0;
if(y > mydiv.offsetHeight - sw) y = mydiv.offsetHeight - sw;
player.style.cssText += `left: ${x}px; top: ${y}px`;
}, 400);
}
let mState = () => aud.paused
? (mydiv.style.setProperty('--state','paused'), vid.pause())
: (mydiv.style.setProperty('--state','running'), vid.play());
aud.addEventListener('playing', mState);
aud.addEventListener('pause', mState);
player.onclick = () => aud.paused ? aud.play() : aud.pause();
})();
</script> {:5_150:}{:5_150:}{:5_150:} {:5_150:}女同胞们,,节日快乐,,哈哈哈哈哈哈 liumang 发表于 2024-3-8 14:40
问好管理!{:5_147:} bgmnet 发表于 2024-3-8 14:42
女同胞们,,节日快乐,,哈哈哈哈哈哈
女同胞们,,节日快乐!{:5_147:} 亦是金 发表于 2024-3-8 18:29
问好管理!
问好亦是金老师,欣赏你的好制作{:5_150:}
页:
[1]