|
|

楼主 |
发表于 2025-7-23 14:19
|
显示全部楼层
参考代码
- <style>
- #pa { margin: 30px 0; left: calc(50% - 81px); transform: translateX(-50%); width: clamp(600px, 90vw, 1400px); height: auto; aspect-ratio: 16/9; background: url('https://638183.freep.cn/638183/t24/w4/u00.webp') no-repeat center/cover; box-shadow: 2px 2px 8px #000; z-index: 1; overflow: hidden; perspective: 800px; display: grid; place-items: center; position: relative; }
- #btnFs { bottom: 20px; color: #eee; }
- #ma { position: absolute; aspect-ratio: 1/1; width: 25%; cursor: pointer; transform-style: preserve-3d; animation: rot 18s linear infinite var(--state); }
- #ma:hover .son { filter: sepia(1); }
- .son { position: absolute; left: 50%; width: 50%; height: 50%; background: url('https://638183.freep.cn/638183/small/f1.png') no-repeat center/ 50% 100%; border: 1px solid tan; border-radius: 54% 46% 93% 7% / 93% 41% 59% 7%; transform-origin: 0% 100%; transform: rotateY(var(--a)); box-shadow: inset 0 0 20px cyan, 1px 1px 8px snow; transition: .75s; }
- .son::before { position: absolute; content: ''; left: -100%; top: 100%; width: 100%; height: 100%; background: inherit; border: inherit; border-radius: inherit; box-shadow: inherit; filter: grayscale(1) opacity(0.25); transform: scale(-1, -1); }
- .vid {position: absolute; width: 100%; height: 100%; object-fit: cover; mask: radial-gradient(transparent 20%, red); -webkit-mask: radial-gradient(transparent 20%, red); opacity: .45; pointer-events: none; }
- @keyframes rot { to { transform: rotateY(360deg); } }
- </style>
- <div id="pa">
- <audio id="aud" src="https://music.163.com/song/media/outer/url?id=2136438007" autoplay loop></audio>
- <video class="vid" src="https://bpic.588ku.com/video_listen/588ku_video/22/11/05/03/11/34/video636563e6dc5bc.mp4" autoplay loop muted></video>
- <div id="ma"></div>
- </div>
- <script type="module">
- import { FS } from 'https://638183.freep.cn/638183/web/js/fullscreen.js';
- FS(pa, ma);
- const tt = 10;
- for (var i = 0; i < tt; i ++) {
- const d = document.createElement('div');
- const c1 = Math.random().toString(16).substring(2, 8), c2 = Math.random().toString(16).substring(2, 8);
- d.className = 'son';
- d.style.cssText += `--a: ${i * 360 / tt}deg;`;
- ma.appendChild(d);
- }
- </script>
复制代码
|
评分
-
| 参与人数 1 | 威望 +50 |
金钱 +100 |
经验 +50 |
收起
理由
|
红影
| + 50 |
+ 100 |
+ 50 |
赞一个! |
查看全部评分
|