宁静 发表于 2022-11-13 11:11

你的身边太过拥挤(偶然原创作品欣赏)

<style>
#papa { margin: auto; left: -270px;width: 1400px; height: 870px; top: 150px; background: url('https://wj.zp68.com/lxx/yunhua/2022/10/22/9IF.gif') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; user-select: none; z-index: 1; --opt: .25;}
#mplayer { position: absolute; bottom: 70px;left: 880px;display: grid; grid-template-columns: auto auto auto; place-items: center; gap: 6px; user-select: none; }
#btnplay { width: 40px; height: 40px; text-align: center; font: normal 40px/40px sans-serif; color: snow; cursor: pointer; animation: rot linear 4s infinite; }
#prog { --ww: 0px; width: 240px; height: 12px; border: 1px solid green; border-radius: 6px; background: snow; opacity: .65; position: relative; }
#prog::before { position: absolute; content: ''; width: var(--ww); height: 12px; border-radius: 6px; background: snow linear-gradient(90deg, orange, green); opacity: .75; }
#audtime { font: normal 14px sans-serif; color: snow; }
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; top: 120px; font: bold 2.4em sans-serif; color: hsl(0,10%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 2px hsla(0,0%,0%,.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(0,50%,20%,.45),hsla(140,100%,50%,.75)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
#dt1{ position: absolute; width: 322px; height: 124px; top: 745px; left: 996px; }
#fish { position: absolute; left: 1050px; top:150px; width: 20px;offset-distance: 0;offset-path: path('M-110 95a93.5 62 0 1 0 187 0a93.5 62 0 1 0 -187 0z'); offset-distance: 100%; animation: swim 25s infinite; }
#fish1 { position: absolute; left: 1055px; top: 155px; width: 20px;offset-distance: 0;offset-path: path('M-110 95a93.5 62 0 1 0 187 0a93.5 62 0 1 0 -187 0z'); offset-distance: 100%; animation: swim 25s infinite; }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(1turn); } }
@keyframes swim { to { offset-distance: 0%; } }
#mpic1 {position: absolute; left: 20px; top: 0; width: 20px;offset-distance: 0;offset-path: path("M0 10 Q500 180, 600 160 T1320 40");animation: move 8s linear infinite;}
#mpic {position: absolute; left: 0px; top: 0; width: 20px;offset-distance: 0;offset-path: path("M0 10 Q500 180, 600 160 T139 40");animation: move 8s linear infinite;}
      @keyframes bgMove1 { from { background-position: 0 0; } to { background-position: -100% 0; } }
      @keyframes bgMove2 { from { background-position: 0 0; } to { background-position: -100% 0; } }
         @keyframes move { to { offset-distance: 100%;} }

</style>
<div id="papa">
   <img id="mpic1" alt="" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" />
   <img id="mpic" alt="" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" />
         <img id="dt1" src="https://wj.zp68.com/lxx/yunhua/2022/10/22/laj.png" alt="" />
      <img id="fish" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" alt="" />
      <img id="fish1" src="https://wj.zp68.com/lxx/yunhua/2022/10/10/xx.gif" alt="" />
      <div id="lrc" data-lrc="偶然原创作品欣赏">偶然原创作品欣赏</div>
      <div id="mplayer">
                <span id="btnplay">❁</span>
                <span id="prog"></span>
                <span id="audtime">00:00 | 00:00</span>
      </div>
</div>
<script>
(function() {
      let aud = new Audio(), mKey = 0, mFlag = true;
      let lrcAr = [
                ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ];
      aud.src = 'https://wj.zp68.com/lxx/yunhua/2022/10/22/ndsbtgyj.mp3';
      aud.loop = true;
      aud.autoplay = true;
      if(aud.paused) btnplay.style.animationPlayState = 'paused';
      btnplay.onclick = () => aud.paused ? aud.play() : aud.pause();
      prog.onclick = (e) => aud.currentTime = aud.duration * e.offsetX / prog.offsetWidth;
      aud.addEventListener('seeked', () => calcKey());
      aud.addEventListener('pause', () =>mState());
      aud.addEventListener('play', () =>mState());
      aud.addEventListener('timeupdate', () => {let prg = aud.currentTime * prog.offsetWidth / aud.duration < 6 ? 6 : aud.currentTime * prog.offsetWidth / aud.duration;prog.style.setProperty('--ww', prg + 'px');audtime.innerText = toMin(aud.currentTime) + ' | ' + toMin(aud.duration);for(j=0; j<lrcAr.length; j++) {if(aud.currentTime >= lrcAr) {cKey = j;if(mKey === j) showLrc(lrcAr);else continue;}}});
      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 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 mState = () => aud.paused ? (btnplay.style.animationPlayState='paused',lrc.style.setProperty('--state', 'paused'),papa.style.setProperty('--opt','0')) : (btnplay.style.animationPlayState='running', lrc.style.setProperty('--state', 'running'),papa.style.setProperty('--opt','.25'));
      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>
<br><br><br><br><br><br><br><br><br><br>

宁静 发表于 2022-11-13 11:13

好朋友偶然的原创词,曲,感觉这首歌曲特别好听,歌词也是写的好,朗朗上口 歌曲旋律也是美,送给大家欣赏

宁静 发表于 2022-11-13 11:14

这个粒子频谱也是特别喜欢,已经用了几次了,希望把最美的效果送给大家

宁静 发表于 2022-11-13 11:15

帖子纯CSS+JS代码制作

楚心兰 发表于 2022-11-13 11:32

前排欣赏

撒哈拉的雨 发表于 2022-11-13 12:42

宁静 发表于 2022-11-13 11:13
好朋友偶然的原创词,曲,感觉这首歌曲特别好听,歌词也是写的好,朗朗上口 歌曲旋律也是美,送给大家欣赏 ...

偶然的原创作品,欣赏{:9022:}

伤痕泪泪 发表于 2022-11-13 13:50

带着板凳来欣赏下

彼岸花 发表于 2022-11-13 19:48

有点陈瑞的味道
凄凄苦苦的别离伤感曲一般都带点嘶哑
而且吐字带点Ti踏更能使人同感

一抹微蓝 发表于 2022-11-13 21:00

偶然介名字看着在哪儿看到过,歌好听,播放器制作也棒{:10_402:}

蜻蜓 发表于 2022-11-14 12:45

今天这手机看到一片白{:9005:}
页: [1] 2 3 4 5
查看完整版本: 你的身边太过拥挤(偶然原创作品欣赏)