平凡 发表于 2024-6-9 22:01

后视镜--罗言

<style>
#papa {
        margin: 150px 0 0 calc(50% - 792px);
        position: relative;
        width: 1422px;
        height: 800px;
        background: tan url('https://pic.imgdb.cn/item/65967826871b83018a38f0d3.jpg');
        background-blend-mode: difference;
        border: 8px solid rgba(0,0,200,.6);
        border-radius: 12px;
        box-shadow: 3px 3px 20px #ccc;
        overflow: hidden;
        z-index: 1;
}
#btnplay {
        position: absolute;
        top: 520px;
        left: 100px;
        width:150px;
        filter: hue-rotate(220deg) drop-shadow(0 0 2px transparent);
        cursor: pointer;
        transition: filter .35s ease-in;
        z-index: 1;
        animation: rotating 5s infinite linear var(--state);
}
#btnplay:hover {
        filter: hue-rotate(0) drop-shadow(0 0 30px white);
}
#vid {
        position: absolute;
        top: -60px;
        width: 1422px;
        height: 860px;
        object-fit: cover;
        filter: opacity(.98);
}


@keyframes rotating {
        to { transform: rotate(1turn); }
}

#tit {
      position: absolute;
      left: -50px;
      top: 630px;
      
      background-image:url('https://xlaj.cn/assets/file/zp/20240102011216.gif'); background-size:cover;
      width:650px; height:200px; font: bold 2.0em serif;
      text-align:center; line-height:200px; color:transparent;
      -webkit-background-clip:text;
         border:0px #eddfdc solid; z-index: 10;
}


</style>

<div id="papa">
        <video id="vid" src="https://link.hhtjim.com/163/2144694164.mp4" loop muted></video>
            


        <audio id="aud" src="http://music.163.com/song/media/outer/url?id=2144694164.mp3" autoplay loop></audio>

<div id="tit">后视镜--罗言</div>


        <img id="btnplay" src="https://pic.imgdb.cn/item/659e2a2e871b83018a56f948.png" alt="" title="播放/暂停" />
</div>

<script>

(function() {

let mState = () => {
        aud.paused ?
                (papa.style.setProperty('--state','paused'), vid.pause()) :
                (papa.style.setProperty('--state','running'), vid.play());
};

aud.addEventListener('playing', mState, false);
aud.addEventListener('pause', mState, false);

btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();

})();

</script>

一剑飘香红 发表于 2024-6-11 15:07

沙发

一剑飘香红 发表于 2024-6-11 15:08

好久未见,问好平凡

一剑飘香红 发表于 2024-6-11 15:08

占位欣赏凡凡的精彩之作

澜天 发表于 2024-6-11 19:45

是自动播放
还是点哪里播放啊
我只看到图片
听不到声音
页: [1]
查看完整版本: 后视镜--罗言