醉美水芙蓉 发表于 2023-4-30 09:43

海来阿木、姚琛 - 时光与他

<style>
#papa {
        margin:80px 0 0 calc(50% - 593px);
        width:1024px;
        height: 640px;
        border-image: linear-gradient(35deg,tan,purple,cyan,orange,red) 4;
        background: url('https://img-baofun.zhhainiao.com/pcwallpaper_ugc/scene/278ff87a470e61fbc679bffac66d6dfe_preview.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.qqmc.com/mp3/music272942150.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-4-30 09:47

玄幻的感觉,赞一个。

罗浮梦 发表于 2023-4-30 09:47

静下来,听首歌,享受。

醉美水芙蓉 发表于 2023-4-30 09:55

罗浮梦 发表于 2023-4-30 09:47
静下来,听首歌,享受。

谢谢朋友支持!五一快乐!

罗浮梦 发表于 2023-4-30 10:13

醉美水芙蓉 发表于 2023-4-30 09:55
谢谢朋友支持!五一快乐!

一起快乐过五一。

焱鑫磊 发表于 2023-4-30 11:34

欣赏水芙蓉佳作!{:4_187:}

绿叶清舟 发表于 2023-4-30 11:56

芙蓉这个制作太漂亮了,节日快乐

醉美水芙蓉 发表于 2023-4-30 12:51

焱鑫磊 发表于 2023-4-30 11:34
欣赏水芙蓉佳作!

谢谢朋友支持!

醉美水芙蓉 发表于 2023-4-30 12:51

绿叶清舟 发表于 2023-4-30 11:56
芙蓉这个制作太漂亮了,节日快乐

清舟五一快乐!

小辣椒 发表于 2023-4-30 13:02

水芙蓉,这个套用就很漂亮{:4_199:}

小辣椒 发表于 2023-4-30 13:03

欣赏精彩的制作{:4_187:}

醉美水芙蓉 发表于 2023-4-30 13:04

小辣椒 发表于 2023-4-30 13:02
水芙蓉,这个套用就很漂亮

谢谢小辣椒的鼓励!祝五一快乐!

小辣椒 发表于 2023-4-30 13:43

醉美水芙蓉 发表于 2023-4-30 13:04
谢谢小辣椒的鼓励!祝五一快乐!

一起快乐~~{:4_171:}

梦缘 发表于 2023-4-30 20:59

幻灯片,欣赏赏问好!

马黑黑 发表于 2023-4-30 22:01

很美

红影 发表于 2023-4-30 23:06

这个制作真美。欣赏水芙蓉好帖{:4_187:}

醉美水芙蓉 发表于 2023-5-1 00:06

梦缘 发表于 2023-4-30 20:59
幻灯片,欣赏赏问好!

谢谢朋友支持!

醉美水芙蓉 发表于 2023-5-1 00:07

马黑黑 发表于 2023-4-30 22:01
很美

谢谢黑黑老师点评支持!

醉美水芙蓉 发表于 2023-5-1 00:07

红影 发表于 2023-4-30 23:06
这个制作真美。欣赏水芙蓉好帖

谢谢红影美女光临!五一快乐!

马黑黑 发表于 2023-5-1 12:12

醉美水芙蓉 发表于 2023-5-1 00:07
谢谢黑黑老师点评支持!

{:4_190:}
页: [1] 2
查看完整版本: 海来阿木、姚琛 - 时光与他