焱鑫磊 发表于 2023-5-21 11:42

《谁能陪我到最后》王馨

<style>
#papa {
        margin: 100px -160px ;
        width:1164px;
        height: 640px;
        border-image: linear-gradient(35deg,tan,purple,cyan,orange,red) 4;
        background: url('https://img.fy6b.com/2023/05/20/0e3733d9e3977.jpg') center/cover no-repeat;
        box-shadow: 3px 8px 20px rgba(0,0,0,.6);
        position: relative;
        display:grid;
        overflow: hidden;
        place-items: center;
    --state: paused;
    animation: hue 10s infinite alternate var(--state);
}
#mplayer {position: absolute;width: 150px;height: 150px;right: -60px;bottom:50px;cursor: pointer;transform-style: preserve-3d;}
.line {position: absolute;width: 1px;height: 100%;transform-style: preserve-3d;}
#vid {
        position: absolute;
        width: 1400px;
        height: 100%;
        border-radius: 2%;
        opacity: .15;
        object-fit: cover;
        pointer-events: none;
}
#lrc {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%);
    height: 50px;
    font: bold 30px/50px sans-serif;
    background: transparent;
    color:Thistle ;
    display: grid;
    place-items: center start;
    pointer-events: none;
    --motion: cover2;
    --tt: 1s;
}

#lrc::before,
#lrc::after {
    position: absolute;
    content: '';
}

#lrc::before {
    content: attr(data-lrc);
    width: 0%;
    height: 100%;
    color: Purple;
    white-space: pre;
    overflow: hidden;
    animation: var(--motion) var(--tt) linear forwards var(--state);
}

#lrc::after {
    width: 100px;
    height: 100px;
    left: -100px;
    border-radius: 50%;
    background:center/cover no-repeat;
    cursor: pointer;
    pointer-events: auto;
    animation: rot 4s infinite linear var(--state);
}

@keyframes cover1 {
    to {
      width: 100%;
    }
}

@keyframes cover2 {
    to {
      width: 100%;
    }
}
@keyframes rot {
    to {
      transform: rotate(360deg);
    }
}
@keyframes rot { to { transform: rotateY(calc(var(--sy) + 360deg)) rotateZ(calc(var(--sz) + 360deg)); } }
@keyframes hue {
      to { filter: hue-rotate(360deg); }
</style>

<div id="papa">
      <div id="mplayer"></div><div id="lrc" data-lrc="HCPlayer">HCPlayer</div><video id="vid" src="https://img.tukuppt.com/video_show/2418175/00/01/83/5b4b08181b572_10s_big.mp4" autoplay="" loop="" muted=""></video>
</div>
<audio id="aud" src="https://www.joy127.com/url/105014.mp3" autoplay loop></audio>

<script>
let total = 60, spans = [];
let mKey = 0, mFlag = true;
let lrcAr = [
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];

let mState = () => papa.style.setProperty('--state', aud.paused ? 'paused' : 'running');
let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrcAr;lrc.dataset.lrc = lrcAr.replace(/<br>/, 'n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');papa.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};
let calcKey = () => {for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime <= lrcAr) {mKey = j - 1;break;}}if (mKey < 0) mKey = 0;if (mKey > lrcAr.length - 1) mKey = lrcAr.length - 1;let time = lrcAr - (aud.currentTime - lrcAr);showLrc(time);};
aud.addEventListener('timeupdate', () => {for(let j = 0; j < lrcAr.length; j ++) {if (aud.currentTime >= lrcAr) {if (mKey === j) showLrc(lrcAr);else continue;}}});
Array.from({length: 64}).forEach( (item,key) => {
      let sp = document.createElement('span');
      sp.className = 'line';
      sp.style.cssText += `
                --sy: ${Math.random() * 720 - 360}deg;
                --sz: ${Math.random() * 720 - 360}deg;
                background: rgba(${Math.random() * 50}, ${Math.random() * 255}, ${Math.random() * 50}, .8);
                transform: rotateY(var(--sy)) rotateZ(var(--sz));
                animation: rot 30s linear infinite var(--state);
      `;
      mplayer.appendChild(sp);
});

mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();
aud.addEventListener('play', mState, false);
aud.addEventListener('pause', mState, false);
</script>

巫荣云师 发表于 2023-5-21 20:10

欣赏收藏老师的[音乐专辑]好看又好听,点赞!

蓝魔 发表于 2023-5-21 22:11

欣赏一下,谢谢。

焱鑫磊 发表于 2023-5-21 22:54

巫荣云师 发表于 2023-5-21 20:10
欣赏收藏老师的[音乐专辑]好看又好听,点赞!

老师晚上好!{:1_292:}

焱鑫磊 发表于 2023-5-21 22:54

蓝魔 发表于 2023-5-21 22:11
欣赏一下,谢谢。

老师晚上好!{:1_292:}

糊图花 发表于 2023-7-3 11:09

一环内

糊图花 发表于 2023-7-3 11:10

问好!{:1_292:}

糊图花 发表于 2023-7-3 11:10

欣赏佳作来了

糊图花 发表于 2023-7-3 11:10

精彩,好听

糊图花 发表于 2023-7-3 11:10

学习,点赞 {:1_293:}   
页: [1] 2
查看完整版本: 《谁能陪我到最后》王馨