|
<style>
@import 'https://638183.freep.cn/638183/web/tz/tz.v4.css';
.pa { --offsetX: 81px; --bg: url('https://638183.freep.cn/638183/t24/w7/mistland.webp') no-repeat center/cover; }
.title-text { font-size: 40px; cursor: pointer; transition: .5s; animation: flash .5s infinite alternate var(--state); }
.title-text:hover { transform: scale(1.2) rotate(15deg); }
.pd-vid { opacity: 1; clip-path: polygon(0 0,50% 20%,100% 0,100% 100%, 50% 80%, 0 100%); }
</style>
<div id="pa" class="pa"></div>
<script type="module">
import TZ from 'https://638183.freep.cn/638183/web/tz/tz.v4.js';
const tz = TZ.TZ('pa');
tz.add('audio', '', '', {src: 'https://music.163.com/song/media/outer/url?id=1924245977'});
tz.add('video', '', 'pd-vid', {src: 'https://img.tukuppt.com/video_show/2629112/00/02/10/5b51555fb44a9.mp4'});
tz.add('div', 'player', 'wrap100', {style: 'bottom: 20px'});
const txtAr = '雾色山脉'.split(''); // 帖子标题按字拆分为数组
// 按标题字数获取外切园上半部各字所在标签的位置
const pos = tz.ringPos(txtAr.length, {cx: 50, cy: 50, r1: 160, r2: 80, a: 180, startA: -180, offsetX: 20});
// 输出半圆弧状标题
pos.forEach((p, k) => {
tz.add('span', '', 'title-text', {style: `left: ${p[0]}px; top: ${p[1]}px; color: ${tz.colorHSL()}`})
.text(txtAr[k])
.to(player)
.playmp3();
});
tz.bgprog().style('width: 120px; bottom: 25px; color: cyan');
tz.fs().style('top: 30px');
</script>
|