本帖最后由 云笛 于 2024-8-5 00:15 编辑
<style>
#mydiv { margin: 0 0 0 calc(50% - 881px);
display: grid;
place-items: center;
width: 1600px;
height: 900px;
top:130px;
background: lightblue url('https://img.wyc520.com.cn/data/attachment/forum/202408/04/234414hyfz53b2s1ykijnb.jpg') no-repeat center/cover;
box-shadow: 0px 0px 0px #000;
user-select: none;
overflow: hidden;
position: relative;
z-index: 3;
#vid {
position: absolute;
width: 100%;
height: calc(130% + 164px);
bottom: -84px;
object-fit: cover;
opacity: .5;
opacity: .90;
mix-blend-mode: screen;
pointer-events: none;
}
#vid1 {
position: absolute;
width: 60%;
height: 76%;
right:0%;
top:418px;
object-fit: cover;
pointer-events: none;
mix-blend-mode: screen;
z-index: 2;
opacity: .90;
-webkit-mask: radial-gradient(circle, silver, lightgreen, cyan, transparent,transparent);
}
#mypic {
position: absolute;
right: 150px;
bottom: 14px;
width: 180px;
height: 180px;
filter: opacity(.55) ;
transition: filter 1s;
cursor: pointer;
transform: rotateY(180deg);
}
</style>
<div id="mydiv">
<video id="vid" src="//video.shipin520.com/video_listen/588ku_preview/19/07/08/16/56/23/video5d2305376b305.mp4" loop></video>
<video id="vid1" src="//video.shipin520.com/video_listen/588ku_preview/21/07/19/17/48/55/video60f54a8727f38.mp4" autoplay="" loop="" muted=""></video>
<img id="mypic" src="https://gd-hbimg.huaban.com/654f88959f266bdb2a931f61b973cbc22955a5a927e90f-vANNa1" alt="" />
</div>
<audio id="aud" src="https://user.wyc520.net/filestores/2024/07/31//d28cca92ad5f0a48c13fe64067a9002d.mp3" autoplay loop></audio>
<script>
(function() {
let mState = () => {
aud.paused ? (mypic.style.setProperty('--state','paused'), vid.pause()) : (mypic.style.setProperty('--state','running'), vid.play());
};
aud.addEventListener('playing', mState, false);
aud.addEventListener('pause', mState, false);
mypic.onclick = () => aud.paused ? aud.play() : aud.pause();
})();
</script>
<br><br><br><br><br><br>
|