楼主: 花简静

花简静贴子代码及说明汇总(翻页有新贴)

[复制链接]
一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-12 22:39 | 显示全部楼层





点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-12 22:39 | 显示全部楼层
本帖最后由 花简静 于 2024-8-18 15:18 编辑

<style> #mydiv {     margin: 130px 0 30px calc(50% - 931px);     width: 1700px;     height: 900px;     background: url('https://pic.imgdb.cn/item/65f065449f345e8d039dcdfa.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(0 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/66/5e5a2fd36a145.mp4" loop muted></video>     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1989498115" autoplay loop></audio>     <img id="player" src="https://638183.freep.cn/638183/web/svg/3star-01.svg" 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>
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
 楼主| 发表于 2024-3-15 19:54 | 显示全部楼层
点评
回复

使用道具

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|千山论坛

GMT+8, 2024-9-21 18:46

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表