本帖最后由 马黑黑 于 2025-8-9 08:33 编辑
<style>
@import 'https://638183.freep.cn/638183/web/css/tz01.css';
#pa { --offsetX: 81px; --bg: url('https://638183.freep.cn/638183/t24/6/tocc.jpeg') no-repeat center/cover; --ma-size: 15%; }
#ma { right: 30px; top: 30px; display: grid; place-items: center; }
.son { position: absolute; width: 50%; height: 100%; }
.son::before, .son::after { position: absolute; content: ''; width: 100%; height: 100%; background: url('https://638183.freep.cn/638183/small/2025/tocc.webp') no-repeat center/cover; clip-path: polygon(0 0,50% 50%,100% 0, 50% 15%,0 0); transform: scale(1) translateY(5px); }
.son::after { transform: scale(1, -1) translateY(5px); }
.son:nth-of-type(2) { transform: rotate(90deg); }
#btnFs { left: 30px; top: 30px; color: #fff; }
#pic, #canv { position: absolute; bottom: 0; cursor: pointer; }
</style>
<div id="pa">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1606119" autoplay loop></audio>
<video class="pd-vid" src="https://img.tukuppt.com/video_show/2402760/00/02/34/5b56bc45c5d1e.mp4" autoplay loop muted></video>
<div id="ma" class="invert">
<div class="son"></div>
<div class="son"></div>
</div>
<img id="pic" src="https://638183.freep.cn/638183/t22/gif/jigu.gif" alt="" />
<canvas id="canv" width="200" height="200"></canvas>
</div>
<script type="module">
import { FS } from 'https://638183.freep.cn/638183/web/js/fullscreen.js';
FS(pa, ma);
const ctx = canv.getContext('2d');
ctx.drawImage(pic, 0, 0, 200, 200);
const mState = () => {
if (aud.paused) {
canv.style.opacity = 1;
pic.style.opacity = 0;
} else {
canv.style.opacity = 0;
pic.style.opacity = 1;
}
};
aud.onplaying = aud.onpause = () => mState();
canv.onclick = () => ma.click();
canv.title = ma.title;
</script>
|