本帖最后由 花简静 于 2024-8-18 15:34 编辑
<style>
#mydiv {
margin: 130px 0 30px calc(50% - 931px);
width: 1700px;
height: 900px;
background: url('https://642303.freep.cn/642303/tu/240623xiame03.webp') 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: 10px;
top: 10px;
--size: 200px;
width: var(--size);
height: var(--size);
transition: 6s;
cursor: pointer;
mix-blend-mode: screen;
transform: rotate(70deg);
}
#player:hover { --size: 360px; }
#vid {
position: absolute;
top: -80px;
right:0px;
width: 100%;
height: 110%;
object-fit: cover;
pointer-events: none;
mix-blend-mode: screen;opacity: .99;
}
</style>
<div id="mydiv">
<video id="vid" src="https://img.tukuppt.com/video_show/2414777/00/01/68/5b4854b8add7c.mp4" loop muted></video>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=27853883" autoplay loop></audio>
<img id="player" src="https://pic.imgdb.cn/item/6677edefd9c307b7e9bf73c2.gif" alt="" />
</div>
<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 | e.layerX, y = e.offsetY | e.layerY, 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>、
<script>
let sFile = document.createElement('script');
sFile.src = 'https://638183.freep.cn/638183/web/api/lrc.js';
sFile.charset = 'utf-8';
document.head.appendChild(sFile);
sFile.onload = () => {
LRC({
papa: '#mydiv',
lrcAr: geci,
btn: '#player',
lrc_css: 'bottom: 26px;left: 50%; transform: translate(-50%); --bg: linear-gradient(rgba(250,250,250,.25),rgba(255,255,0,.65)); opacity: .99;font-size: 26px;color: #fff;',
});
};
let geci = [
[0.09,"单曲:爱,不解释",2.7],
[2.76,"歌手:张杰",1.1],
[3.84,"所属专辑:爱,不解释",1.0],
[4.8,"作词 : 李焯雄",1.1],
[5.92,"作曲 : 萧煌奇",1.2],
[7.07,"202406千山论坛贺糊涂仙儿芳辰",5.8],
[12.88,"",12.0],
[24.88,"转啊转 还没到你身旁",7.5],
[35.05,"在流浪 各自人海茫茫",8.1],
[46.08,"当希望 像被淋湿的月光",8.1],
[56.02,"亲爱的 我们注定要遇上",8.7],
[65.77,"风穿过衣裳 阳光芬芳",5.6],
[72.51,"我们为何悲伤",3.1],
[78.07,"拐多少弯 依然不晚",4.1],
[83.27,"你是我的信仰",3.0],
[91.06,"因为爱就是爱",3.4],
[97,"不解释 你一定懂 尽在不言中",5.2],
[103.26,"是感应 是认定",2.0],
[105.9,"是心跳的共鸣",2.2],
[108.56,"一眼就认得 爱是不解释",4.2],
[113.26,"因为爱就是爱",2.5],
[118.03,"不解释 你一定懂 尽在不言中",5.4],
[124.01,"是自信 是认定",2.5],
[127.25,"是温柔的唤醒",2.9],
[130.76,"爱不解释 我要如此 爱你",6.0],
[138.32,"",11.8],
[150.08,"当希望 像被淋湿的月光",8.1],
[160.9,"亲爱的 我们注定要遇上",7.9],
[171.12,"风穿过衣裳 阳光芬芳",4.6],
[176.57,"我们为何悲伤",2.9],
[181.87,"拐多少弯 依然不晚",4.2],
[187.23,"你是我的信仰",3.0],
[193.06,"因为爱就是爱",2.7],
[198.09,"不解释 你一定懂 尽在不言中",5.4],
[204.56,"是感应 是认定",2.7],
[207.24,"是心跳的共鸣",2.2],
[210.01,"一眼就认得 爱是不解释",4.1],
[214.51,"因为爱就是爱",2.7],
[220.03,"不解释 你一定懂 尽在不言中",4.8],
[225.77,"是自信 是认定",2.1],
[228.09,"是温柔的唤醒",3.4],
[232.22,"爱不解释 我要如此 爱你",5.9],
[241.16,"因为爱就是爱",2.7],
[246.61,"不解释 你一定懂 尽在不言中",4.9],
[252.62,"就算还没认识",1.9],
[255.27,"我们早就熟悉",2.9],
[258.83,"爱不解释 我要如此 爱你",6.0]
];
</script>
|