偶然 发表于 2022-11-20 06:03

【偶然翻唱】梨涡浅笑

本帖最后由 偶然 于 2022-11-29 23:30 编辑 <br /><br /><meta charset="UTF-8">
<style>
#papa { margin: 120px 0 0 calc(50% - 730px); display: grid; place-items: center; width: 1280px; height: 640px; background: #000 url('https://pan.365.tf/uploads/lxx/20221118/bj.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; perspective: 1000px; overflow: hidden; user-select: none; position: relative; z-index: 1; }
#mplayer { position: absolute; top: 350px;right: 100px; z-index: 1; }
#btnwrap { display: block; fill: hsla(30, 20%, 80%, .9); cursor: pointer; }
#btnwrap:hover { fill: hsla(90, 100%, 100%, .9); }
#tmsg { fill: hsla(30, 100%, 90%, .9); stroke: none; font: bold 1em sans-serif; }
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; top: 120px; left: 130px; font: bold 2.4em sans-serif; color: hsl(240,50%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 1px hsla(30,10%,10%,.95)); }
#lrc::before { position: absolute; content: attr(data-lrc); width: 20%; height: 100%; color: transparent; overflow: hidden; white-space: nowrap; background: linear-gradient(180deg,hsla(120,90%,50%,.45),hsla(120,90%,60%,.75)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }

#papa > span { position: absolute; right: 160px; opacity: .75; color: olive; font: bold 3em serif; display: grid; place-items: center; }
#dt1{ position: absolute; width: 700px; height: 400px; top: 50px; left: -2px; }
#dt2{ position: absolute; width: 300px; height: 240px; top: 380px; left: 152px; }
#dt3{ position: absolute; width: 300px; height: 240px; top: 370px; left: 200px; }
#dt4{ position: absolute; width: 88px; height: 88px; top: 390px; left: 280px; }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
</style>
   
<div id="papa"><img src=" " alt="" style="position: absolute; left:-250; top: -10; mix-blend-mode: screen;" />
<img id="dt1" src="https://pan.365.tf/uploads/lxx/20221118/dd.gif" alt="" />
<img id="dt2" src="https://pan.365.tf/uploads/lxx/20221118/hua.gif" alt="" />
<img id="dt3" src="https://pan.365.tf/uploads/lxx/20221118/hua.gif" alt="" />
<img id="dt4" src="https://pan.365.tf/uploads/lxx/20221025/hd.gif" alt="" />
<svg id="mplayer" width="120" height="120"><g id="yiya" transform="rotate(-90, 60, 60)" style="cursor: pointer;"><circle id="track" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="hsla(100, 20%, 80%, .65)" /><circle id="prog" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="hsla(100,50%,50%,.55)" /></g><g id="btnwrap"><path id="btnplay" d="M 50 50,50 70,70, 60 z"></path><path id="btnpause" d="M 52 50,52 70,57 70,57 50,52 50 z M 60 50,60 70,65 70,65 50,60 50 z" style="display: none;"></path><path d="M 57 50,60 50,60 70,57 70 z" fill="transparent" /></g><path id="curPath" d="M 20 70 Q 60 0 100 70" fill="none" stroke="none"/><path id="durPath" d="M 20 55 Q 60 110 100 55" fill="none" stroke="none"/><g id="tmsg"><text x="34" y="0"><textPath id="curMsg" xlink:href="#curPath" dominant-baseline="text-after-edge">00:00</textPath></text><text x="29" y="0"><textPath id="durMsg" xlink:href="#durPath" dominant-baseline="text-before-edge">00:00</textPath></text></g></svg>

<div id="lrc" data-lrc="梨涡浅笑 演唱 黄小文(偶然)">梨涡浅笑 演唱 黄小文(偶然)</div></div><audio id="aud" src="https://pan.365.tf/uploads/lxx/20221118/lwqx.mp3" loop autoplay></audio>
<script>
(function() {(function() {let total = 0, rr = 150;Array.from({length: total}).forEach((item,key) => {item = document.createElement('span');item.innerText = String.fromCharCode(9800+key);item.style.transform = `rotate(${360 / total * key}deg) translateY(${rr}px) rotate(-${360 / total * key}deg`;papa.appendChild(item);});})();
        let mKey = 0, mFlag = true, cc = { x: 1*track.getAttribute('cx'), y: 1*track.getAttribute('cy'), len: track.getTotalLength(),};
        let lrcAr = [
                ,
                ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
       
];
        prog.style.strokeDasharray = prog.style.strokeDashoffset =cc.len;
        btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
        yiya.onclick = (e) => {let deg = Math.atan2(e.offsetY - cc.y, e.offsetX - cc.x) * 180 / Math.PI;deg += (e.offsetX < cc.x && e.offsetY < cc.y) ? 450 : 90;aud.currentTime = aud.duration * deg / 360;};
        aud.addEventListener('pause', () => mState());
        aud.addEventListener('play', () => mState());
        aud.addEventListener('seeked', () => calcKey());
        aud.addEventListener('timeupdate', () => {prog.style.strokeDashoffset = cc.len - cc.len * aud.currentTime / aud.duration;curMsg.textContent = toMin(aud.currentTime);durMsg.textContent = toMin(aud.duration);for (j = 0; j < lrcAr.length; j++) {if (aud.currentTime >= lrcAr) {if (mKey === j) showLrc(lrcAr);else continue;}}});
        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');lrc.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);};
        let mState = () => aud.paused ? (btnplay.style.display = 'block', btnpause.style.display = 'none', lrc.style.setProperty('--state', 'paused')) : (btnplay.style.display = 'none', btnpause.style.display = 'block', lrc.style.setProperty('--state', 'running'));
        let toMin = (val)=> {if (!val) return '00:00';val = Math.floor(val);let min = parseInt(val / 60), sec = parseFloat(val % 60);if(min < 10) min = '0' + min;if(sec < 10) sec = '0' + sec;return min + ':' + sec;};
        papa.oncontextmenu = () => false;
})();
</script>
<br><br><br><br><br>

楚心兰 发表于 2022-11-20 08:20

首席听歌

小沫 发表于 2022-11-20 08:34

梨涡浅笑,浅笑...
旋律好熟悉,原来是许冠杰的歌啊
QQ音乐播放上榜的歌曲

缱绻 发表于 2022-11-20 09:11

粤语专唱啊
帅!棒!赞!{:10_403:}

蜻蜓 发表于 2022-11-20 10:30

很完美的演绎!{:10_402:}

一抹微蓝 发表于 2022-11-20 11:23

介歌好听呀,漂亮的播放贴子,歌词同步啊,{:10_402:}

一抹微蓝 发表于 2022-11-20 11:24

看到介歌名不自然就笑了

蜻蜓 发表于 2022-11-20 11:25

一抹微蓝 发表于 2022-11-20 11:24
看到介歌名不自然就笑了

你为何笑,哈哈

一抹微蓝 发表于 2022-11-20 12:22

蜻蜓 发表于 2022-11-20 11:25
你为何笑,哈哈

看到歌名啊,{:9001:}

慕儿 发表于 2022-11-20 15:20

偶染是广东人吗?粤语唱得阔以呢,比我标准。{:9001:}
页: [1] 2
查看完整版本: 【偶然翻唱】梨涡浅笑