|
|

楼主 |
发表于 2023-9-15 07:50
|
显示全部楼层
本帖测试粒子插件的第六种运动形态:从外面旋转进入帖子中心处。帖子代码——
- <style>
- #mydiv { margin: 100px auto; width: 1024px; height: 640px; box-shadow: 0 0 12px gray; background: url('https://638183.freep.cn/638183/t23/webp2/uttg.webp') no-repeat center/cover; overflow: hidden; z-index: 1; position: relative; display: grid; place-items: center; --state: running; }
- #mydiv > img { transform: translate(30px); }
- </style>
- <div id="mydiv">
- <img src="https://638183.freep.cn/638183/t23/gif/dancing.gif" alt="" />
- </div>
- <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1848494864" loop="loop" autoplay="autoplay"></audio>
- <script>
- (function() {
- let js1 = 'https://638183.freep.cn/638183/web/api/meter_pinpu_lrc.js',
- js2 = 'https://638183.freep.cn/638183/web/lizi/h5lz_02.js';
- let loadJs = (url,callback) => {
- let body = document.querySelector('body'), jsNode = document.createElement('script');
- jsNode.charset = 'utf-8';
- jsNode.setAttribute('src', url);
- body.appendChild(jsNode);
- jsNode.onload = () => callback();
- };
- loadJs(js1, () => {
- let geci = [[2,"殊途同归",4],[7,"",1]];
- HCPlayer({
- papa: '#mydiv',
- lrcAr: geci,
- lrc_css: `
- top: 20px;
- color: lightblue;
- --bg: linear-gradient(rgba(200,200,250,.25),rgba(100,200,250,.65));
- `,
- player_css: `
- bottom: 10px;
- color: snow;
- `,
- pinpu: { num: 40, width: 3, color: 'rgba(255,255,255,.5)' },
- });
- });
- loadJs(js2, () => {
- H5lz({
- papa: '#mydiv',
- total: 160,
- size: {width: 16, height: 16},
- shape: {background: '', borderRadius: '50%'},
- maxTime: 24,
- offset: {x: 0, y: 0},
- ani: 'out2C',
- css: 'opacity: .8;',
- });
- });
- })();
- </script>
复制代码
|
|