相约爱晚亭 发表于 2022-11-26 13:17

小白船

<style>
#papa { margin: 120px 0 0 calc(50% - 730px); display: grid; place-items: center; width: 1280px; height: 640px; background: #000 url('http://tuku.link/imgs/2022/11/dabc4c64a358832c.gif') 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; bottom: 50px;left: 50px; 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: 50px; height: 50px; bottom: 70px; left: 190px; }
#dt3{ position: absolute; width: 394px; height: 550px; top: 70px; left: 600px; }
#dt4{ position: absolute; width: 88px; height: 88px; top: 420px; left: 130px; }
@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://s1.ax1x.com/2022/11/25/zYKl28.png" alt="" />
<img id="dt3" src="https://s1.ax1x.com/2022/11/25/zteRQe.png" 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 style="position:absolute; width: 1000px; top:30px; right: 100px;font-family:楷体;font-size: 36px;font-weight:bold;font-style: italic; color:#802A2A;">《小白船》</div>
<div style="position:absolute; width: 1000px; bottom: 45px; left: 170px;font-family:楷体;font-size: 14px;font-weight:bold;font-style: italic; color:#997300;">2022.11.26</div>

<div id="lrc" data-lrc="《朝鲜童谣-小白船》">《朝鲜童谣-小白船》</div></div><audio id="aud" src="https://www.kumeiwp.com/sub/filestores/2022/11/06/59983adeb7143d66b3a5c4626315d277.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 = [
               ['0.46', '《小白船》',5.7],
['6.46', '朝鲜童谣',2.0],
['8.60', '词/曲:尹克荣',2.1],
['10.77', '演唱:梦之旅演唱组合',3.2],
['14.17', 'LRC歌词制作:相约爱晚亭',4.6],
['18.99', '蓝蓝的天空银河里',6.9],
['26.27', '有只小白船',6.7],
['33.37', '船上有棵桂花树',6.4],
['40.12', '白兔在游玩',6.6],
['47.08', '桨儿桨儿看不见',6.5],
['53.94', '船上也没帆',6.1],
['60.36', '飘呀飘呀飘向云天',13.4],
['74.36', 'LRC歌词制作:相约爱晚亭',6.0],
['80.79', '渡过那条银河水',6.6],
['87.69', '走向云彩国',6.82],
['94.87', '走过那个云彩国',6.2],
['101.35', '再向哪儿去',6.0],
['107.70', '在那遥远的地方',6.8],
['114.86', '闪着金光',6.5],
['121.70', '晨星是灯塔',6.6],
['128.60', '照呀照得亮',5.4],
['134.30', '演唱:梦之旅演唱组合',5.6],
['140.17', 'LRC歌词制作:相约爱晚亭',4.8],
['145.17', 'LRC歌词制作:相约爱晚亭',6.7],
['152.23', '渡过那条银河水',6.6],
['159.21', '走向云彩国',6.6],
['166.11', '走过那个云彩国',6.3],
['172.74', '再向哪儿去',6.5],
['179.60', '在那遥远的地方',6.3],
['186.22', '闪着金光',6.6],
['193.14', '晨星是灯塔',6.5],
['199.96', '照呀照得亮',5.7],
['206.00', '谢谢欣赏朝鲜童谣《小白船》',8.6],
['215.00', '谢谢欣赏朝鲜童谣《小白船》',5.7],
['221.00', '',4.5]
];
        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><br><br><br><br><br><br><br>

午老虎 发表于 2022-11-26 15:51

欣赏了 学习分享

蓝魔 发表于 2022-11-26 23:52

欣赏一下,谢谢。

非常开心 发表于 2022-11-27 11:44

欣赏收藏老师新作 好看又好听
水平越来越高了

相约爱晚亭 发表于 2022-12-1 15:04

午老虎 发表于 2022-11-26 15:51
欣赏了 学习分享

谢谢您的关注和支持!

相约爱晚亭 发表于 2022-12-1 15:04

蓝魔 发表于 2022-11-26 23:52
欣赏一下,谢谢。

谢谢您的关注和支持!

相约爱晚亭 发表于 2022-12-1 15:07

非常开心 发表于 2022-11-27 11:44
欣赏收藏老师新作 好看又好听
水平越来越高了

谢谢您的支持和鼓励!学习,实践,创新,追求前行。

午老虎 发表于 2022-12-5 17:05

欣赏了谢谢

相约爱晚亭 发表于 2023-1-15 11:27

午老虎 发表于 2022-12-5 17:05
欣赏了谢谢

谢谢您的支持!祝新年快乐!

容轩听雨 发表于 2023-1-15 22:27

画面雅致、灵动,LRC编辑合拍,歌曲蕴情寄怀,创作辛苦,问好老师,小年快乐!
页: [1] 2
查看完整版本: 小白船