太依赖 (DJ版) - 任妙音/祁隆
<style>
#papa { left: -344px; width: 1280px; height: 640px;top:150px;background: url('https://pan.365.tf/uploads/lxx/20221028/bj.jpg') no-repeat center/cover; box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; user-select: none; overflow: hidden; z-index: 1; --opt: .25; }
#papa > img { position: absolute; top: 400px;mix-blend-mode: multiply;}
#papa > img:nth-of-type(1) { transform: translate(60px,-95px);left: 14px; }
#papa > img:nth-of-type(3) { transform: translate(50px,-75px);top:300px; left: 100px; }
#papa > img:nth-of-type(2) { transform: rotate(-15deg); }
#mplayer { position: absolute; bottom: 50px; left: 100px; display: grid; grid-template-columns: auto auto auto; place-items: center; gap: 6px; user-select: none; }
#btnplay { width: 40px; height: 40px; cursor: pointer; animation: rot linear 3s infinite; }
#prog { --ww: 0px; width: 300px; height: 8px;border-radius: 6px; background: snow; opacity: .65; position: relative; }
#prog::before { position: absolute; content: ''; width: var(--ww); height: 8px; border-radius: 6px; background: snow linear-gradient(90deg, red,Maroon); opacity: .65; }
#audtime { font: normal 14px sans-serif; color: Maroon; }
#lrc { --motion: cover1; --tt: 5s; --state: paused; position: absolute; bottom: 130px;left: 200px; font: bold 1.8em sans-serif; color: hsl(0,10%,90%); -webkit-background-clip: text; filter: drop-shadow(1px 1px 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(5,90%,50%,.35),hsla(5,90%,50%,.35)); filter: inherit; -webkit-background-clip: text; animation: var(--motion) var(--tt) linear forwards; animation-play-state: var(--state); }
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
@keyframes rot { to { transform: rotate(1turn); } }
</style>
<div id="papa">
<img src="https://pan.365.tf/uploads/lxx/20221028/dt.gif" alt="" />
<img src="https://pan.365.tf/uploads/lxx/20221028/dt.gif" alt="" />
<img src="https://pan.365.tf/uploads/lxx/20221028/dt.gif" alt="" />
<div id="lrc" data-lrc="花潮lrc在线">花潮lrc在线</div>
<div id="mplayer">
<img id="btnplay" src="https://pan.365.tf/uploads/lxx/20221028/164.png" alt="" />
<span id="prog"></span>
<span id="audtime">00:00 | 00:00</span>
</div>
</div>
<script>
(function() {
let aud = new Audio(), mKey = 0, mFlag = true, down = true;
let lrcAr = [
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
];
aud.src = 'https://pan.365.tf/uploads/lxx/20221028/yiln.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;};
document.title = '依赖你';
})();
</script>
<br><br><br><br><br><br><br><br><br><br><br><br> 再捣鼓一个,这个修改了一下播放器的滚动条高度,换了按钮 @马黑黑 小辣椒 发表于 2022-10-28 21:24
再捣鼓一个,这个修改了一下播放器的滚动条高度,换了按钮 @马黑黑
应该是很漂酿 马黑黑 发表于 2022-10-28 21:28
应该是很漂酿
黑黑晚上好,这个播放器按钮可以换各种自己的图图,我就是没有时间玩,做了5个按钮{:4_173:} 醉美水芙蓉 发表于 2022-10-28 21:34
效果不错!谢谢小辣椒分享!
谢谢水芙蓉欣赏,问好{:4_204:} 小辣椒 发表于 2022-10-28 21:36
黑黑晚上好,这个播放器按钮可以换各种自己的图图,我就是没有时间玩,做了5个按钮
一口气做5个,你太贪心啦{:4_170:} 马黑黑 发表于 2022-10-28 21:36
一口气做5个,你太贪心啦
差不多的类型,一次PS就可以了 小辣椒 发表于 2022-10-28 21:50
差不多的类型,一次PS就可以了
额,批发的呀 马黑黑 发表于 2022-10-28 21:51
额,批发的呀
哈哈~~~以后想玩就玩了 小辣椒 发表于 2022-10-28 21:54
哈哈~~~以后想玩就玩了
有备无患 马黑黑 发表于 2022-10-28 21:55
有备无患
是啊,今天晚上也是赶时间,做一个玩玩 这个做得漂亮,动图也用得好看,亲爱的真棒{:4_187:} 小辣椒 发表于 2022-10-28 21:59
是啊,今天晚上也是赶时间,做一个玩玩
非常不错呢 红影 发表于 2022-10-28 22:11
这个做得漂亮,动图也用得好看,亲爱的真棒
哈哈~~~亲爱的多夸夸{:4_170:} 马黑黑 发表于 2022-10-28 22:12
非常不错呢
本来不用这个图的,主要紫色弄不好就换了这个播放器,这个图,你今天发的我刚看见,那个图标题是这首歌的名字,以后还真不能用了 小辣椒 发表于 2022-10-28 22:19
本来不用这个图的,主要紫色弄不好就换了这个播放器,这个图,你今天发的我刚看见,那个图标题是这首歌的 ...
{:4_203:} 欣赏精美音画佳作! 小辣椒 发表于 2022-10-28 22:17
哈哈~~~亲爱的多夸夸
这首歌曲很欢快,夸的同时坐下来听歌{:4_187:} 马黑黑 发表于 2022-10-28 22:21
是的,想速度完成就没有去修改了{:4_170:}
页:
[1]
2