|
|
小播设置不对称。修正后的整体代码:
- <style>
- @import 'https://638183.freep.cn/638183/web/tz/tz.v3.css';
- .pa { --offsetX: 81px; --bg: url('https://pic1.imgdb.cn/item/693ab9cd0edaae20ec58a2ea.jpg') no-repeat center/cover; }
- .petal { width: 100%; height: 100%; top: -50%; background: url('https://pic1.imgdb.cn/item/693aba8d97f6538bc4c68464.png') no-repeat center/contain; transform-origin: 50% 100%; }
- .petal::after { content: ''; position: absolute; width: 100%; height: 100%; top: 100%; background: inherit; transform: scale(1, -1); }
- </style>
- <div id="pa" class="pa"></div>
- <script type="module">
- import TZ from 'https://638183.freep.cn/638183/web/tz/tz.v3.js';
- const tz = TZ.TZ('pa');
- tz.add('audio', '', '', {src: 'https://music.163.com/song/media/outer/url?id=1614747'});
- tz.add('video', '', 'pd-vid', {src: 'https://img.tukuppt.com/video_show/2629112/00/01/93/1614747.mp4'});
- tz.add('div', 'player', 'wrap100 rot-ani', {style: 'bottom: 100px; cursor: pointer; border: 1px solid gray'}).playmp3();
- tz.lzRot(2, 'player', {tag: 'div', className: 'petal', angle: 180});
- tz.bgprog().style('bottom: 30px; color: lemonchiffon');
- tz.fs().style('right: 20px; bottom: 20px');
- </script>
复制代码 主要更改的是css选择器 .petal 和它的伪元素
|
|