vip贵宾
性别保密
威望 点
注册时间2024-1-24
最后登录1970-1-1
在线时间 小时
好友
UID54720
听众
阅读权限120
- 积分
- 4684
鲜花( 647) 鸡蛋( 0)
|
楼主 |
发表于 2024-7-27 15:51
|
显示全部楼层
本帖最后由 云笛 于 2024-7-27 16:14 编辑
代码:
- <div class="t_fsz"><table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_342895">
- <style>
- #mydiv {
- margin: 130px 0 30px calc(50% - 881px);
- width: 1600px;
- height: 900px;
- background: url('https://img.wyc520.com.cn/data/attachment/forum/202407/27/154236lji9rgazn85at5gs.jpg') 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;
- width: 160px;
- height: 160px;
- transition: 3s;
- filter: invert(1) drop-shadow(10 0 24px ForestGreen);
- cursor: pointer;
- animation: rot 5s linear infinite var(--state);
- }
- #player:hover { filter: invert(.8) drop-shadow(0 0 24px red); }
- #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); } }
- </style>
- <div id="mydiv">
- <video id="vid" src="https://img.tukuppt.com/video_show/2269348/00/14/17/5e1c8201ef2f7.mp4" loop muted></video>
- <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1411532260&userid=1411532260" autoplay loop></audio>
- <img id="player" src="https://gd-hbimg.huaban.com/7e3a0d4ad64f1b51a7d14c32d060b9bc5d96390456201-vRhA2i" 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>
- <br><br><br><br><br></td></tr></table>
复制代码
特效链接:
https://img.tukuppt.com/video_show/2269348/00/14/17/5e1c8201ef2f7.mp4
音乐:笑傲江湖主题曲《沧海一声笑》(肖战版)
链接 https://music.163.com/song/media/outer/url?id=1411532260&userid=1411532260
素材图:
|
鲜花鸡蛋月到天心 在2024-7-28 07:28 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下 青石板 在2024-7-27 19:05 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下
|