池鹤 发表于 2026-8-2 17:12:45

【Remedied】- FLO 前奏拿捏,疯狂爱上!

<!-- DZ论坛音乐卡片|全部颜色变量标注版
✅所有颜色集中在顶部参数区,每一行附带中文注释,直接修改色值即可
✅已标注:卡片背景、文字、边框、折叠面板配色、播放器圆角、字号、播放器高度
✅修复折叠样式、图片加载、圆角、点击事件全部BUG
✅修复:折叠点击无响应JS兼容问题
-->
<style>
/* ==========【全局可调参数区|全部颜色在这里修改】========== */
.music-card-wrap{
    /* 主卡片背景颜色 */
    --card-bg: #19191f;
    /* 主标题白色文字颜色(歌曲名) */
    --text-color: #f0f0f0;
    /* 次要文字颜色(歌手名) */
    --text-sub-color: #aaaaaa;
    /* 主卡片外围边框颜色 */
    --border-color: #333338;
    /* 外层卡片整体圆角 */
    --card-radius: 14px;

    /* 尺寸 */
    --card-width: 500px;
    --cover-size: 350px;
    --vinyl-border-width: 30px;
    --vinyl-opacity: 0.6;

    /* 弹窗大图设置 */
    --img-max-width: 85%;
    --img-max-height: 85vh;
    --img-border-radius: 6px;

    /* 播放器 */
    --player-radius: 10px;       /* 播放器圆角 */
    --player-height: 1px;      /* 播放器高度 */

    /* 折叠面板字号 */
    --fold-title-fontsize: 13px;    /* 折叠标题字号 */
    --fold-content-fontsize: 13px;   /* 折叠内文字号 */
    /* =====折叠面板配色变量===== */
    --fold-bg: #26262c;                /* 折叠面板背景色 */
    --fold-border-color: #444448;      /* 折叠面板边框色 */
    --fold-title-color: #eeeeee;       /* 折叠标题文字颜色 */
    --fold-content-color: #cccccc;   /* 折叠内部文字颜色 */

    /* 动画 */
    --rotate-duration: 30s;
    --modal-transition-time: 0.6s;
    --hover-move-time: 0.25s;
    --hover-move-height: -8px;

    --font-family: "Microsoft Yahei",sans-serif;

    width: var(--card-width);
    margin: 15px auto;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 20px;
    color: var(--text-color);
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
    box-sizing: border-box;
    transition: transform var(--hover-move-time) ease, box-shadow var(--hover-move-time) ease;
}
/* 悬浮上浮效果 */
.music-card-wrap:hover{
    transform: translateY(var(--hover-move-height));
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

/* 黑胶封面容器 */
.vinyl-cover-box{
    width: var(--cover-size);
    height: var(--cover-size);
    margin: 0 auto 16px auto;
    position: relative;
}
.vinyl-ring{
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000; /* 黑胶外圈底色,如需修改在这里 */
    opacity: var(--vinyl-opacity);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
/* 封面图片,直接修改src更换图片 */
.music-cover{
    width: calc(100% - var(--vinyl-border-width)*2);
    height: calc(100% - var(--vinyl-border-width)*2);
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: var(--vinyl-border-width);
    left: var(--vinyl-border-width);
    z-index: 2;
    cursor: pointer;
    display:block;
}
/* 黑胶旋转动画 */
@keyframes rotateDisc {
    from{transform: rotate(0deg);}
    to{transform: rotate(360deg);}
}
.rotate-active{
    animation: rotateDisc var(--rotate-duration) linear infinite;
}

/* =========播放器样式|无多余边框========= */
.music-player-box{
    width: 100%;
    height: var(--player-height);
    margin-bottom: 12px;
    border-radius: var(--player-radius);
    overflow: hidden;
    background: transparent !important;
}
.music-player-box iframe{
    width: 100%;
    height: 100%;
    border: 0 none;
    margin:0;
    padding:0;
    display:block;
}

/* 歌曲文字 */
.song-name{
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin:6px 0;
    color: var(--text-color);
}
.song-author{
    font-size:14px;
    color: var(--text-sub-color);
    text-align: center;
    margin-bottom:16px;
}

/* =========折叠面板========= */
.fold-panel{
    border: 1px solid var(--fold-border-color);
    border-radius: 12px;
    overflow: hidden;
    background:var(--fold-bg);
}
.fold-title{
    padding:18px 22px;
    cursor: pointer;
    font-size: var(--fold-title-fontsize);
    display:flex;
    justify-content: space-between;
    align-items:center;
    user-select:none;
    color:var(--fold-title-color);
}
.fold-title .arrow{
    font-size: var(--fold-title-fontsize);
    transition: transform 0.25s ease;
}
.fold-content{
    padding:0 22px;
    font-size: var(--fold-content-fontsize);
    line-height:1.6;
    max-height:0;
    overflow:hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    color:var(--fold-content-color);
}
.fold-content.open{
    max-height:600px;
    padding:0 22px 18px 22px;
}

/* 大图弹窗遮罩 */
.img-modal{
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.85); /* 图片弹窗黑色遮罩颜色 */
    display:none;
    justify-content:center;
    align-items:center;
    z-index:19999;
    opacity:0;
    transition: opacity var(--modal-transition-time) ease;
}
.img-modal.show{
    display:flex;
    opacity:1;
}
.img-modal img{
    max-width:var(--img-max-width);
    max-height:var(--img-max-height);
    border-radius:var(--img-border-radius);
}
</style>

<div class="music-card-wrap">
    <!-- 【更换封面位置:修改img里面src=""地址】 -->
    <div class="vinyl-cover-box">
      <div class="vinyl-ring"></div>
      <img class="music-cover rotate-active" src="https://www.qqmcc.net/data/attachment/album/202607/06/154050ote92iomx6tc002l.jpg">
    </div>

    <!-- 网易云解析iframe播放器 -->
    <div class="music-player-box">
      <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=298 height=52 src="//music.163.com/outchain/player?type=2&id=3410499074&auto=1&height=32"></iframe>
    </div>

    <div class="song-name">Remedied</div>
    <div class="song-author">歌手:FLO 所属专辑:Remedied</div>

    <!-- 折叠区域 -->
    <div class="fold-panel">
      <div class="fold-title">
            <span>点击展开查看音乐地址内容</span>
            <span class="arrow">▼</span>
      </div>
      <div class="fold-content">
          **** Hidden Message *****
      </div>
    </div>
</div>

<!-- 图片放大弹窗 -->
<div class="img-modal">
    <img id="modalImg">
</div>

<script>
// 修复:DOM加载完成立即绑定事件,规避DZ页面加载延迟问题
document.addEventListener('DOMContentLoaded',function(){
    const coverImg = document.querySelector('.music-cover');
    const modal = document.querySelector('.img-modal');
    const modalImg = document.getElementById('modalImg');
    const foldTitle = document.querySelector('.fold-title');
    const foldContent = document.querySelector('.fold-content');
    const arrow = foldTitle.querySelector('.arrow');

    // 单击封面打开大图
    coverImg.addEventListener('click',function(){
      modalImg.src = this.src;
      modal.classList.add('show');
    });

    // 双击封面启停黑胶旋转
    coverImg.addEventListener('dblclick',function(e){
      e.preventDefault();
      this.classList.toggle('rotate-active');
    });

    // 点击遮罩关闭大图
    modal.addEventListener('click',function(){
      modal.classList.remove('show');
    });

    // 折叠点击切换
    foldTitle.addEventListener('click',function(){
      foldContent.classList.toggle('open');
      if(foldContent.classList.contains('open')){
            arrow.style.transform = 'rotate(180deg)';
      }else{
            arrow.style.transform = 'rotate(0deg)';
      }
    });
});
</script>

途癌 发表于 2026-8-2 18:59:26

前奏很喜欢,感谢分享~

不浪漫罪名 发表于 2026-8-3 12:18:27

听完心情变好,感谢分享曲目

养只温柔猫 发表于 2026-8-3 12:19:12

越听上头,感恩无私分享

夏天ikaer 发表于 2026-8-3 12:19:41

整个论坛就爱你的分享,亲亲~

乔安 发表于 2026-8-3 12:20:15

整个论坛就爱你的分享,亲亲~

ztaoboy 发表于 2026-8-3 12:21:33

小众佳作,感谢楼主发掘分享

半暖时光 发表于 2026-8-3 12:22:11

旋律好听,前来打卡致谢

刀藏月光锋 发表于 2026-8-3 12:23:22

歌单新增成员,谢谢楼主

世界真细心seeu 发表于 2026-8-3 12:24:11

舒服节奏,秒控我三分钟
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: 【Remedied】- FLO 前奏拿捏,疯狂爱上!