小辣椒 发表于 2022-10-22 20:42

你的身边太过拥挤(偶然原创作品)TO:偶然【学习黑黑 花播放器效果】

<style>
#papa { margin: auto; left: -404px; width: 1400px; height: 870px; top: 150px; background: url('https://wx.ttt.dj/data/nfs/img/orF.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: 30px; 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: 300px; 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: 80px; 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://wx.ttt.dj/data/nfs/img/danx.gif" />
   <img id="mpic" alt="" src="https://wx.ttt.dj/data/nfs/img/danx.gif" />
         <img id="dt1" src="https://wx.ttt.dj/data/nfs/img/prj.png" alt="" />
      <img id="fish" src="https://wx.ttt.dj/data/nfs/img/danx.gif" alt="" />
      <img id="fish1" src="https://wx.ttt.dj/data/nfs/img/danx.gif" alt="" />
      <div id="lrc" data-lrc="花潮lrc在线">花潮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 = 'http://wx.ttt.dj/data/nfs/mp3/orgyj.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-10-22 20:45

偶然的最新原创词 曲作品,小辣椒学习黑黑{花}播放器做一次,小鱼儿的动图我换了星星@马黑黑

小辣椒 发表于 2022-10-22 20:46

@偶然

偶然现在很忙~~还抽时间一年完成5首原创作品,太棒了!

梦油 发表于 2022-10-22 20:48

小辣椒朋友晚上好!着彩色的流星真漂亮哎!

小辣椒 发表于 2022-10-22 20:50

梦油 发表于 2022-10-22 20:48
小辣椒朋友晚上好!着彩色的流星真漂亮哎!

梦油晚上好{:4_187:}

马黑黑 发表于 2022-10-22 20:58

哎呀,好美的作品。小辣椒你真是棒棒的呢~

马黑黑 发表于 2022-10-22 20:59

元素还挺多的,这也能操控的到,不简单哈

小辣椒 发表于 2022-10-22 21:06

马黑黑 发表于 2022-10-22 20:58
哎呀,好美的作品。小辣椒你真是棒棒的呢~

黑黑,这个是偶然的原创作品,我就发音乐版了{:4_173:}

小辣椒 发表于 2022-10-22 21:07

马黑黑 发表于 2022-10-22 20:59
元素还挺多的,这也能操控的到,不简单哈

就一个星星{:4_170:}

小辣椒 发表于 2022-10-22 21:10

谢谢岁月,这个粒子频谱玩了几次了@走过岁月

绿叶清舟 发表于 2022-10-22 21:14

这个场景太漂亮啦

绿叶清舟 发表于 2022-10-22 21:16

偶然厉害啊,真好听

马黑黑 发表于 2022-10-22 21:20

小辣椒 发表于 2022-10-22 21:07
就一个星星

俺眼花了么
安看到的不止一个星星

马黑黑 发表于 2022-10-22 21:20

小辣椒 发表于 2022-10-22 21:06
黑黑,这个是偶然的原创作品,我就发音乐版了

偶然我不认识呢

小辣椒 发表于 2022-10-22 21:24

绿叶清舟 发表于 2022-10-22 21:14
这个场景太漂亮啦

清舟晚上好~~~这个是岁月的功劳用的他的粒子频谱{:4_173:}

梦油 发表于 2022-10-22 21:26

小辣椒 发表于 2022-10-22 20:50
梦油晚上好

你好小辣椒朋友。天空有这么几颗彩色流星太漂亮啦

小辣椒 发表于 2022-10-22 21:26

绿叶清舟 发表于 2022-10-22 21:16
偶然厉害啊,真好听

偶然确实现在越来越厉害了,去年做了好像3首原创作品,其中一首得了五个一工程奖,今年比去年增加了。

我也是感觉这首歌曲很好听

小辣椒 发表于 2022-10-22 21:27

马黑黑 发表于 2022-10-22 21:20
俺眼花了么
安看到的不止一个星星

仔细看看,用路径的就一颗星星{:4_170:}

小辣椒 发表于 2022-10-22 21:28

马黑黑 发表于 2022-10-22 21:20
偶然我不认识呢

偶然是音乐版和翻唱版的版主,最近很少来玩,大冒号的,玩的时间少了

小辣椒 发表于 2022-10-22 21:30

梦油 发表于 2022-10-22 21:26
你好小辣椒朋友。天空有这么几颗彩色流星太漂亮啦

哈哈····星星都是黑黑老师教的路径,小辣椒学习做上帖里面了
页: [1] 2 3 4
查看完整版本: 你的身边太过拥挤(偶然原创作品)TO:偶然【学习黑黑 花播放器效果】