马黑黑 发表于 2022-11-4 07:45

月落的声音

<style>
        #papa { left: -302px; width: 1200px; height: 750px; background: url('https://638183.freep.cn/638183/t22/webp/moondown.webp') no-repeat center/cover; box-shadow: 3px 3px 20px #000; display: grid; place-items: center; user-select: none; position: relative; z-index: 1; }
        #mplayer { position: absolute; bottom: 10px; }
        #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: 20px; left: 30px; font: bold 2.4em sans-serif; color: hsl(240,50%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 2px 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(240,20%,50%,.45),hsla(240,50%,60%,.75)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
        .mpic { position: absolute; width: 460px; height: 460px; background: url('https://638183.freep.cn/638183/t22/webp/xkyy.webp') no-repeat center/cover; mix-blend-mode: screen; border-radius: 50%; opacity: .7; animation: rot linear 80s infinite alternate; }
        .mp1 { transform: translate(200px,-200px) scale(.4); }
        .mp2 { transform: translate(-200px,200px) scale(.4); }
        @keyframes cover1 { from { width: 0; } to { width: 100%; } }
        @keyframes cover2 { from { width: 0; } to { width: 100%; } }
        @keyframes rot { to { transform: rotate(1turn); opacity: 1; } }
</style>

<div id="papa">
        <span class="mpic"></span><span class="mpic mp1"></span><span class="mpic mp2"></span>
        <div id="lrc" data-lrc="花潮论坛lrc在线">花潮论坛lrc在线</div>
        <svg id="mplayer" width="120" height="120">
                <g id="mama" transform="rotate(-90, 60, 60)" style="cursor: pointer;">
                        <circle id="track" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="hsla(240, 20%, 80%, .9)" />
                        <circle id="prog" cx="60" cy="60" r="50" fill="none" stroke-width="10" stroke="hsla(240,50%,60%,.75)" />
                </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>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=1977849891.mp3" loop autoplay></audio>

<script>
(function() {
        let mKey = 0, mSeek = false, mFlag = true;
        let lrcAr = [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,];
        let cc = { x: 1*track.getAttribute('cx'), y: 1*track.getAttribute('cy'), len: track.getTotalLength(),};
        prog.style.strokeDasharray = prog.style.strokeDashoffset =cc.len;
        btnwrap.onclick = () => aud.paused ? aud.play() : aud.pause();
        mama.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 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 showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = lrc.dataset.lrc = lrcAr;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 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;};
})();
</script>

马黑黑 发表于 2022-11-4 08:00

最后几句歌词的意思:

nuneila a ba za ali za li li
(你看啊 月亮那么亮)
nunala a sa za a mi mu guagua
(你听见了吗 在唱歌的是谁家的姑娘)
nuneila em caz a a li ba li li
(你看啊 光照亮了远方)
adujia atipadenisasa
(我还是想要你回到我的身旁)

马黑黑 发表于 2022-11-4 08:02

月落的声音是 一颗狼星 许篮心 演唱的歌曲,发行于2022年8月27日,收录于同名专辑月落的声音中。

小辣椒 发表于 2022-11-4 08:53

黑黑早,手机先卡位

梦油 发表于 2022-11-4 09:14

好幽静的夜空啊!

小辣椒 发表于 2022-11-4 09:31

这歌特别好听,黑黑选歌也是按图意{:4_173:}

小辣椒 发表于 2022-11-4 09:35

@
{:4_170:}

马黑黑 发表于 2022-11-4 09:36

小辣椒 发表于 2022-11-4 09:31
这歌特别好听,黑黑选歌也是按图意

确切地说,图音按题意

小辣椒 发表于 2022-11-4 09:36

手机吃字{:4_198:}

马黑黑 发表于 2022-11-4 09:37

梦油 发表于 2022-11-4 09:14
好幽静的夜空啊!

新歌,很特别

马黑黑 发表于 2022-11-4 09:37

小辣椒 发表于 2022-11-4 09:35
@

有声音啦?

马黑黑 发表于 2022-11-4 09:37

小辣椒 发表于 2022-11-4 08:53
黑黑早,手机先卡位

等下出去办事,等司机,没事鼓捣下

小辣椒 发表于 2022-11-4 09:38

@冬天的雨

昨天看见你回帖说准备学习做一次,今天这个黑黑新鲜出炉的,就做这个,三天之内完成

马黑黑 发表于 2022-11-4 09:38

小辣椒 发表于 2022-11-4 09:36
手机吃字

手机支持语音输入,试试笑个嘎嘎看看{:4_170:}

小辣椒 发表于 2022-11-4 09:41

马黑黑 发表于 2022-11-4 09:36
确切地说,图音按题意

选歌在前{:4_199:}

小辣椒 发表于 2022-11-4 09:42

马黑黑 发表于 2022-11-4 09:37
新歌,很特别

第一次听,原来是新歌,黑黑也是速度的,新歌做帖了

小辣椒 发表于 2022-11-4 09:42

马黑黑 发表于 2022-11-4 09:37
有声音啦?

听到了{:4_199:}

小辣椒 发表于 2022-11-4 09:43

马黑黑 发表于 2022-11-4 09:37
等下出去办事,等司机,没事鼓捣下

冒号,就是速度,一下子一个帖,我回家迟就来不及做帖

小辣椒 发表于 2022-11-4 09:44

马黑黑 发表于 2022-11-4 09:38
手机支持语音输入,试试笑个嘎嘎看看

人丑声音也是丑{:4_170:}

梦油 发表于 2022-11-4 11:09

马黑黑 发表于 2022-11-4 09:37
新歌,很特别

谢谢你,分享了。
页: [1] 2 3 4 5
查看完整版本: 月落的声音