2024年6月23日 星期日
<style>
@import 'https://638183.freep.cn/638183/web/css/yslrc.css';
#tz { --ox: 90px; --lrc-top: calc(100% - 80px); --lrc-bg: radial-gradient(cyan, white, orange) center/120px 60px; width: 1080px; height: 655px; background: url('https://638183.freep.cn/638183/t24/3/vjy.jpeg') no-repeat center/cover; margin: 30px 0; }
#player { position: absolute; left: calc(50% - 110px); bottom: 20px; width: 45px; height: 45px; border-radius: 50%; border: thick groove; border-color: cyan orange yellow green; display: grid; place-items: center; transition: .8s; --opt: 1; }
#player::before, #player::after { position: absolute; content: ''; width: 20px; height: 20px; background: orange; transition: .3s; cursor: pointer; }
#player::before { clip-path: polygon(0 0, 0 100%, 100% 50%); opacity: calc(var(--opt) * 1); background: cyan; }
#player::after { mask: linear-gradient(to right, red 30%, transparent 30%, transparent 70%, red 70%, red 0); -webkit-mask: linear-gradient(to right, red 30%, transparent 30%, transparent 70%, red 70%, red 0); opacity: calc(1 - var(--opt)); }
#player:hover { transform: scale(1.1); filter: invert(.3) drop-shadow(0 0 20px black); }
.vid { height: calc(100% + 60px); }
</style>
<div id="tz" class="tz" data-lrc="竹间语">
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=35023486" autoplay loop></audio>
<video id="vid" class="vid" src="https://img.tukuppt.com/video_show/2402760/00/01/32/5b3f53c677460.mp4" autoplay loop muted></video>
<div id="player"></div>
</div>
<script>
var mState = () => {
player.style.setProperty('--opt', +aud.paused);
player.title = ['暂停','播放'][+aud.paused];
aud.paused ? vid.pause() : vid.play();
};
aud.oncanplay = aud.onplaying = aud.onpause = () => mState();
player.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>
|