|
|

楼主 |
发表于 2023-9-17 08:09
|
显示全部楼层
帖子代码- <style>
- #mydiv {
- margin: 0 0 0 calc(50% - 593px);
- width: 1000px;
- height: 600px;
- background: url('https://638183.freep.cn/638183/t23/webp2/01.webp') no-repeat center/cover;
- box-shadow: 0 0 10px #333;
- overflow: hidden;
- position: relative;
- --state: paused;
- }
- lz-3d {
- position: absolute;
- left: calc(50% - 5px);
- top: calc(50% - 5px);
- width: 10px;
- height: 10px;
- border-radius: 50%;
- background: gray;
- transform: perspective(200px) rotate(var(--deg)) translate3d(var(--xx), var(--yy), var(--zz));
- animation: o2C var(--du) var(--delay) infinite linear var(--state);
- }
- @keyframes o2C {
- to { transform: perspective(200px) rotate(0) translate3d(0,0,0); }
- }
- </style>
- <div id="mydiv"></div>
- <audio id="aud" src="https://music.163.com/song/media/outer/url?id=434974069" autoplay loop></audio>
- <script>
- (function(){
- let total = 120, ww = mydiv.offsetWidth, hh = mydiv.offsetHeight;
- let script = document.createElement('script');
- script.charset = 'utf-8';
- script.src = 'https://638183.freep.cn/638183/web/api/simpleplayer.js';
- document.body.appendChild(script);
- Array.from({length: total}).forEach( (item,key) => {
- item = document.createElement('lz-3d');
- item.style.cssText += `
- background: #${Math.random().toString(16).substr(-6)};
- --xx: ${Math.random() * ww}px;
- --yy: ${Math.random() * hh}px;
- --zz: ${150 + Math.random() * 50}px;
- --deg: ${360 + Math.random() * 360}deg;
- --du: ${15 + Math.random() * 15}s;
- --delay: ${Math.random() * -15}s;
- `;
- mydiv.appendChild(item);
- });
- script.onload = () => {
- HCPlayer({
- papa: '#mydiv',
- player_css: 'left: 10px; bottom: 10px;',
- img: {
- enter: '',/* 进入全屏按钮地址 */
- quit: '',/* 退出全屏按钮地址 */
- play: '',/* 播放按钮地址 */
- pause: '',/* 暂停按钮地址 */
- }
- });
- }
- })();
- </script>
复制代码
|
评分
-
| 参与人数 1 | 威望 +50 |
金钱 +100 |
经验 +50 |
收起
理由
|
红影
| + 50 |
+ 100 |
+ 50 |
赞一个! |
查看全部评分
|