岩新新 发表于 2023-6-20 21:20

祁隆、乐凡 - 等你等了那么久

本帖最后由 岩新新 于 2023-6-21 08:07 编辑 <br /><br /><style>
.papa { left: -462px; width: 1400px; height: 740px; border-radius: 6px; background: tan url('http://www.kumeiwp.com/sub/filestores/2023/06/20/ac5bf25524686a474756894ad097cd36.gif') no-repeat center/cover; overflow: hidden; box-shadow: 4px 4px 8px #000; position: relative; }
#vid { position: absolute; width: 1000px; height: 740px; left: 0px;top:0px; object-fit: cover; opacity: 1;z-index: 1;}
.papa::before, .papa::after { position: absolute; content: ''; border-radius: inherit; width: 60%; height: 100%; transition: all 2s linear;z-index: 10; }
.papa::before { background: tan url('https://pan.111t.net/view.php/20b029e01daa97887a0e22e5f406519c.gif') no-repeat center/cover;transform: rotateY(-180deg); }
.papa::after { left: 60%; background: tan url('https://pan.111t.net/view.php/20b029e01daa97887a0e22e5f406519c.gif') no-repeat center/cover; transform: rotateY(0deg); }
.papa:hover::before { transform: translate(-120%,0%) rotate(0deg); }
.papa:hover::after { transform: translate(120%,0%) rotateY(180deg); }
.papa input { border: none; outline: none; opacity: .75; cursor: pointer; }
.papa p { margin: 0; padding: 0; }
.playbox {   position: absolute; left: calc(50% 50px); top: 600px; padding: 30px; font: normal 1em sans-serif; color: #FF0000; border-radius: 8px; overflow: hidden; z-index: 20; }
.playbox::before { position: absolute;text-align: center;left: 0; top: 0px; right: 0; bottom: 0; z-index: 20; }
#btnplay { width: 30px; height: 30px; border-radius: 50%; }
#btnplay:hover { background: #eee; color: #ff0000; }
</style>
<style type="text/css">.items{ animation: slider 0.26s linear infinite ;}
@keyframes slider {from {opacity: 1;filter:hue-rotate(360deg)contrast(100%)brightness(100%);}
50% {opacity: 1;}to {opacity: 1;filter:hue-rotate(0deg)contrast(120%)brightness(100%);}}
</style>
<style type="text/css">.items1{ animation: slider1 1s linear infinite ;}
@keyframes slider1 {from {opacity: 1;filter:hue-rotate(360deg)contrast(150%)brightness(100%);}
50% {opacity: 1;}to {opacity: 1;filter:hue-rotate(0deg)contrast(150%)brightness(100%);}}
</style>
<div class="items1"><div class="papa"><video id="vid" src="" autoplay="autoplay" loop="loop" muted="muted"></video></div>


<div class="playbox">
                <div class="items"><p id="geci"style="width: 960px; margin-left: -160px;font-family:华文隶书;font-size: 2.8em;text-align: center;filter:drop-shadow(#ffffff 1px 0 0)drop-shadow(#ffffff 0 1px 0)drop-shadow(#ffffff -1px 0 0) drop-shadow(#ffffff 0 -1px0);">LRC Loading ... </p>        </div>
                <p style="display: flex; align-items: center; gap: 4px; margin-left: 200px;margin-top: 0px;">
                        <input id="btnplay" type="button" value=">" />
                        <input id="slider" type="range" min="0" max="100" value="0" />
                        <span id="per"style="color: #eeeeee;font-size: 1.2em">0%</span>
                </p>
        </div>
        <audio id="aud" src="http://www.kumeiwp.com/sub/filestores/2023/06/20/147309d02ef9c47cba22a6adbf738cae.mp3" autoplay="autoplay" loop="loop"></audio>
</div>

<script>

let slider = document.querySelector('#slider'),
        aud = document.querySelector('#aud'),
        per = document.querySelector('#per'),
        btnplay = document.querySelector('#btnplay'),
        geci = document.querySelector('#geci');
let slip = 0; //误差值
let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
slider.onmousedown = () => aud.pause();
slider.onchange = () => { aud.currentTime = slider.value * aud.duration / 100; aud.play(); }
btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('playing', () => btnplay.value = '||');
aud.addEventListener('pause', () => btnplay.value = '>');

aud.addEventListener('timeupdate', () => {
        let prog = 100 * aud.currentTime / aud.duration;
        slider.value = prog;
        per.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);
                for(j=0; j<lrcAr.length; j++){
                if(aud.currentTime >= lrcAr - slip){
                        geci.innerHTML = lrcAr;
                }
        }
});

let toMin = (sec) => {
        if(!sec) return '0:00';
        sec = parseInt(sec);
        return parseInt(sec / 60) + ':' + parseFloat(sec % 60).toString().padStart(2,'0');
}

</script>

梦缘 发表于 2023-6-20 22:37

欣赏精彩分享,点赞!{:4_187:}

红影 发表于 2023-6-20 22:55

这两个半图合起来怎么是美女的两半个脸,有点怪异{:4_173:}

醉美水芙蓉 发表于 2023-6-20 23:32

岩新新 发表于 2023-6-21 07:52

梦缘 发表于 2023-6-20 22:37
欣赏精彩分享,点赞!

谢谢欣赏支持!

岩新新 发表于 2023-6-21 07:52

红影 发表于 2023-6-20 22:55
这两个半图合起来怎么是美女的两半个脸,有点怪异

谢谢欣赏支持!

岩新新 发表于 2023-6-21 07:52

醉美水芙蓉 发表于 2023-6-20 23:32
还是一开始的好看!

谢谢欣赏支持!

红影 发表于 2023-6-21 19:20

岩新新 发表于 2023-6-21 07:52
谢谢欣赏支持!

问好新新,晚上好{:4_187:}
页: [1]
查看完整版本: 祁隆、乐凡 - 等你等了那么久