温墨客 发表于 3 天前

【Discover】- Minnutes 去发现新事物吧!

<style>
:root{--bg-color:#ADD8E6;--progress-color:#A9DF84;}
.music-card{max-width:420px;margin:10px auto;background:var(--bg-color);backdrop-filter:blur(14px);border-radius:34px;padding:24px;font-family:system-ui}
.music-cover{width:100%;aspect-ratio:1/1;border-radius:16px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#eee;margin-bottom:18px}
.music-cover img{max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:cover!important;pointer-events:none !important;}
.music-title-row{display:flex;justify-content:space-between;margin-bottom:6px;gap:8px}
.music-title{font-size:28px !important;margin:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.music-like{width:26px;height:26px;cursor:pointer;flex-shrink:0;margin-top:16px}
.music-singer{font-size:18px;color:#444;margin:0 0 14px}
.music-lyric{font-size:15px;color:#666;margin:0 0 16px}
.music-time-row{display:flex;justify-content:space-between;font-size:12px;color:#666;margin-bottom:6px}
.music-progress{width:100%;height:4px;background:#ddd;border-radius:99px}
.music-progress-bar{height:100%;width:0;background:var(--progress-color);border-radius:99px}
.music-btn-row{display:flex;justify-content:space-between;align-items:center}
.music-btn-row img{width:26px;height:26px;cursor:pointer}
.music-play{width:56px;height:56px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #00000012;cursor:pointer}
</style>
<div class="music-card">
<div class="music-cover"></div>
<div class="music-title-row">
<h2 class="music-title">Discover</h2>
<img class="music-like" id="likeBtn" src="https://www.qqmcc.net/data/attachment/album/202610/22/160519yh2qmxmyrh2xcqmc.png">
</div>
<div class="music-singer">Minnutes</div>
<div class="music-lyric">如果你能流露出爱意<br>If you let your love show</div>
<div class="music-time-row"><span id="curTime">00:00</span><span id="totalTime">02:39</span></div>
<div class="music-progress"><div class="music-progress-bar" id="progressBar"></div></div>
<br>
<div class="music-btn-row">
<img src="https://www.qqmcc.net/data/attachment/album/202610/22/155730vnammnln61bttn5g.png">
<img src="https://www.qqmcc.net/data/attachment/album/202610/22/155730a4pbp8pnep7ppp47.png">
<div class="music-play" id="playBtn"><img id="playIcon" src="https://www.qqmcc.net/data/attachment/album/202610/22/155731nb5pk2epp2dmmzc5.png"></div>
<img src="https://www.qqmcc.net/data/attachment/album/202610/22/155730f3yog1tdtdkx40wg.png">
<img src="https://www.qqmcc.net/data/attachment/album/202610/22/155730wr9t66s1lb19mdz4.png">
</div>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=298 height=1 src="//music.163.com/outchain/player?type=2&id=21224495&auto=1&height=32"></iframe>
</div>
<script>
(function(){
const c=document.getElementById('curTime'),b=document.getElementById('progressBar'),t=document.getElementById('totalTime');
const playBtn=document.getElementById('playBtn'),playIcon=document.getElementById('playIcon'),likeBtn=document.getElementById('likeBtn');
const playSrc="https://www.qqmcc.net/data/attachment/album/202610/22/155731nb5pk2epp2dmmzc5.png";
const pauseSrc="https://www.qqmcc.net/data/attachment/album/202610/22/155730rm7ldu8jdgd87y0g.png";
const likeOff="https://www.qqmcc.net/data/attachment/album/202610/22/160519yh2qmxmyrh2xcqmc.png";
const likeOn="https://www.qqmcc.net/data/attachment/album/202610/22/160812nt71pzittbuetpfx.png";
let isPlay=true,isLike=false,timer=null;
const s=x=>{let =x.split(':').map(Number);return m*60+n};
const f=x=>{let m=String(Math.floor(x/60)).padStart(2,'0'),n=String(Math.floor(x%60)).padStart(2,'0');return m+':'+n};
let total=s(t.innerText),now=0;
const run=()=>{now+=0.1;if(now>=total){now=total;pausePlay()}c.innerText=f(now);b.style.width=now/total*100+'%'};
const startTimer=()=>timer=setInterval(run,100);
const stopTimer=()=>clearInterval(timer);
const pausePlay=()=>{isPlay=false;playIcon.src=playSrc;stopTimer()};
const startPlay=()=>{isPlay=true;playIcon.src=pauseSrc;startTimer()};
playBtn.onclick=()=>isPlay?pausePlay():startPlay();
likeBtn.onclick=()=>{isLike=!isLike;likeBtn.src=isLike?likeOn:likeOff};
run();startTimer();
})();
</script>

冷声 发表于 3 天前

刷到帖子,立刻保存收藏

Ayer 发表于 3 天前

曲风很对我的胃口。

橘子漓 发表于 3 天前

安利成功,已经循环。

生于南方 发表于 3 天前

标记一下,无聊的时候再来听。

宠辱不惊 发表于 3 天前

感谢分享,挖到好歌

浅唱蝶舞 发表于 3 天前

鼓点恰到好处,忍不住跟着律动

Copycat 发表于 3 天前

听完火速收藏,码住慢慢听。

鹿菏与鹿 发表于 3 天前

旋律缓缓流淌,温柔又动人

Antony、7 发表于 3 天前

前奏不错,听着舒服
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: 【Discover】- Minnutes 去发现新事物吧!