|
<style>
#mhh {
--state: running;
margin: 30px 0 30px calc(50% - 593px);
width: 1024px;
height: 640px;
background: url('https://642303.freep.cn/642303/tu/sadf.webp') no-repeat center/cover;
border: 1px solid gray;
pointer-events: none;
overflow: hidden;
position: relative;
}
#mhh::before {
content: '';
position: absolute;
right: 430px;
top: 190px;
width: 130px;
height: 130px;
border-radius: 50%;
background: url('https://pic.imgdb.cn/item/66d85314d9c307b7e93e339b.png') no-repeat center/cover;
cursor: pointer;
pointer-events: auto;
animation: rot 6s linear infinite var(--state);
}
#mhh::after {
content: '';
position: absolute;
left: 100px;
top: 130px;
width: 100px;
height: 100px;
border-radius: 50%;
background: url('https://pic.imgdb.cn/item/66d8530dd9c307b7e93e2d40.png') no-repeat center/cover;
cursor: pointer;
pointer-events: auto;
animation: rot 6s linear infinite var(--state);
}
#vid1 {
position: absolute;
width: 640px;
height:640px;
left:220px;
- top:-500px;
opacity: .99;
object-fit: cover;
border-radius: 50%;
mix-blend-mode: screen;
pointer-events: none;
}
#vid2 {
position: absolute;
width: 100%;
height:100%;
opacity: .59;
object-fit: cover;
mix-blend-mode:lighten;
pointer-events: none;
transform: rotateX(180deg);
-webkit-mask: linear-gradient(to top, red 58%, transparent 63.5%,transparent 0 );
}
@keyframes rot { to { transform: rotate(360deg); } }
</style>
<div id="mhh" title="播放/暂停">
<video id="vid1" src="https://bpic.588ku.com/video_listen/588ku_preview/23/02/08/12/12/14/video63e3211ee939e.mp4" autoplay loop muted></video>
<video id="vid2" src="https://bpic.588ku.com/video_listen/588ku_preview/24/07/01/11/35/57/video6682241d43f12.mp4" autoplay loop muted></video>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=304937" autoplay loop></audio>
</div>
<script>
mState = () => {
mhh.style.setProperty('--state', aud.paused ? 'paused' : 'running');
mhh.title = ['暂停','播放'][+aud.paused];
aud.paused ? vid1.pause() : vid1.play();
aud.paused ? vid2.pause() : vid2.play();
};
aud.oncanplay = aud.onplaying = aud.onpause = () => mState();
mhh.onclick = () => aud.paused ? aud.play() : aud.pause();
</script>
|