本帖最后由 云笛 于 2024-8-4 21:16 编辑
<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/183209ok92s3910aolq1uu.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(100% + 164px);
bottom: -84px;
object-fit: cover;
opacity: .5;
opacity: .70;
mix-blend-mode: screen;
pointer-events: none;
}
#vid1 {
position: absolute;
width: 60%;
height: 60%;
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: 438px;
bottom: 263px;
width: 100px;
height: 100px;
filter: opacity(.55) ;
transition: filter 1s;
cursor: pointer;
transform: rotateY(180deg);
}
</style>
<div id="mydiv">
<video id="vid" src="https://img.tukuppt.com/video_show/2475824/00/02/05/5b4ffd401d669.mp4" loop></video>
<video id="vid1" src="//video.shipin520.com/videos/11/77/23/b_5dfgtCFmI6X61562117723_10s.mp4" autoplay="" loop="" muted=""></video>
<img id="mypic" src="https://gd-hbimg.huaban.com/654f88959f266bdb2a931f61b973cbc22955a5a927e90f-vANNa1" alt="" />
</div>
<audio id="aud" src="http://cgi.kg.qq.com/fcgi-bin/fcg_get_play_url?shareid=aahHjv8aM7yuO8am&shareuid=639c9d86272e3f893c49&abtype=13&shareDescABType=1&topsource=a0_pn201001004_z11_u1103238287_l1_t1722498578__&pageId=details_of_creations" 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>
|