content-cards
intermediate
music
player
cards
modern
interactivo
Categoría · Tarjetas de Contenido Nivel de Dificultad · Intermedio Publicado el · 18 de agosto de 2025

Reproductor de Música Estilo Tarjeta

Una interfaz moderna de reproductor de música basada en tarjetas con portadas de álbumes, controles interactivos y animaciones suaves.

#music #player #cards #modern #interactivo

Diseño Responsivo

Soporte para Modo Oscuro

líneas

1010

Compatibilidad del Navegador

Chrome · Firefox · Safari · Edge

Vista Previa en Vivo

Interactúa con el componente sin salir de la página.

600px

Resumen

Una interfaz moderna de reproductor de música basada en tarjetas con portadas de álbumes, controles interactivos y animaciones suaves.

Cómo usarlo

  1. Copia el marcado HTML en tu página.
  2. Pega el CSS en tu hoja de estilos y verifica que los selectores coincidan con el HTML.
  3. Pega el JavaScript y cárgalo después del HTML.
  4. Ajusta espaciados, colores y textos para tu sistema de diseño.

Consejos de personalización

  • Renombra las clases para evitar conflictos con tu CSS existente.
  • Reemplaza colores fijos por variables CSS para facilitar el tema.
  • Comprueba el diseño en 320px, 768px y 1024px.
  • Prueba el modo oscuro con tus colores de fondo y texto.

HTML

214

líneas

CSS

543

líneas

JavaScript

253

líneas


                <div class="card-music-player">
  <div class="player-header">
    <h1 class="player-title">Mi Música</h1>
    <div class="player-stats">
      <span class="total-songs">24 canciones</span>
      <span class="total-duration">1h 32m</span>
    </div>
  </div>
  
  <div class="now-playing-card">
    <div class="album-art-container">
      <div class="album-art">
        <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3ClinearGradient id='grad1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23ff6b6b;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234ecdc4;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='200' height='200' fill='url(%23grad1)'/%3E%3Ccircle cx='100' cy='100' r='60' fill='%23fff' opacity='0.2'/%3E%3Ccircle cx='100' cy='100' r='20' fill='%23333'/%3E%3C/svg%3E" alt="Portada del Álbum">
        <div class="play-overlay">
          <button class="main-play-btn" id="main-play-btn">
            <svg class="play-icon" viewBox="0 0 24 24" fill="currentColor">
              <path d="M8 5v14l11-7z"/>
            </svg>
            <svg class="pause-icon" viewBox="0 0 24 24" fill="currentColor" style="display: none;">
              <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
            </svg>
          </button>
        </div>
      </div>
      <div class="vinyl-effect"></div>
    </div>
    
    <div class="track-info">
      <h2 class="track-title" id="current-track-title">Sueños de Medianoche</h2>
      <p class="track-artist" id="current-track-artist">Luna y Las Estrellas</p>
      <div class="track-details">
        <span class="album-name">Vibraciones Cósmicas</span>
        <span class="release-year">2024</span>
      </div>
    </div>
    
    <div class="progress-section">
      <div class="time-display">
        <span id="current-time">2:34</span>
        <span id="total-time">4:12</span>
      </div>
      <div class="progress-bar-container">
        <div class="progress-bar" id="progress-bar">
          <div class="progress-fill" id="progress-fill"></div>
          <div class="progress-handle" id="progress-handle"></div>
        </div>
      </div>
    </div>
    
    <div class="player-controls">
      <button class="control-btn" id="shuffle-btn" aria-label="Aleatorio">
        <svg viewBox="0 0 24 24" fill="currentColor">
          <path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z"/>
        </svg>
      </button>
      
      <button class="control-btn" id="prev-btn" aria-label="Anterior">
        <svg viewBox="0 0 24 24" fill="currentColor">
          <path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/>
        </svg>
      </button>
      
      <button class="control-btn play-pause-btn" id="play-pause-btn" aria-label="Reproducir/Pausar">
        <svg class="play-icon" viewBox="0 0 24 24" fill="currentColor">
          <path d="M8 5v14l11-7z"/>
        </svg>
        <svg class="pause-icon" viewBox="0 0 24 24" fill="currentColor" style="display: none;">
          <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
        </svg>
      </button>
      
      <button class="control-btn" id="next-btn" aria-label="Siguiente">
        <svg viewBox="0 0 24 24" fill="currentColor">
          <path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"/>
        </svg>
      </button>
      
      <button class="control-btn" id="repeat-btn" aria-label="Repetir">
        <svg viewBox="0 0 24 24" fill="currentColor">
          <path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/>
        </svg>
      </button>
    </div>
    
    <div class="volume-section">
      <button class="control-btn" id="volume-btn" aria-label="Volumen">
        <svg viewBox="0 0 24 24" fill="currentColor">
          <path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/>
        </svg>
      </button>
      <div class="volume-slider">
        <input type="range" id="volume-slider" min="0" max="100" value="75">
        <div class="volume-fill"></div>
      </div>
    </div>
  </div>
  
  <div class="playlist-section">
    <h3 class="playlist-title">A Continuación</h3>
    <div class="music-cards-container">
      <div class="music-card active" data-title="Sueños de Medianoche" data-artist="Luna y Las Estrellas" data-album="Vibraciones Cósmicas" data-duration="4:12">
        <div class="card-album-art">
          <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cdefs%3E%3ClinearGradient id='grad2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23ff6b6b;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%234ecdc4;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='80' height='80' fill='url(%23grad2)'/%3E%3Ccircle cx='40' cy='40' r='25' fill='%23fff' opacity='0.2'/%3E%3Ccircle cx='40' cy='40' r='8' fill='%23333'/%3E%3C/svg%3E" alt="Álbum">
          <div class="card-play-btn">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M8 5v14l11-7z"/>
            </svg>
          </div>
        </div>
        <div class="card-info">
          <h4 class="card-title">Sueños de Medianoche</h4>
          <p class="card-artist">Luna y Las Estrellas</p>
          <span class="card-duration">4:12</span>
        </div>
        <div class="card-actions">
          <button class="action-btn" aria-label="Me gusta">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
            </svg>
          </button>
          <button class="action-btn" aria-label="Más">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>
            </svg>
          </button>
        </div>
      </div>
      
      <div class="music-card" data-title="Ondas Estelares" data-artist="Colectivo Cósmico" data-album="Espacio Profundo" data-duration="3:45">
        <div class="card-album-art">
          <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cdefs%3E%3ClinearGradient id='grad3' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%236c5ce7;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23a8e6cf;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='80' height='80' fill='url(%23grad3)'/%3E%3Ccircle cx='40' cy='40' r='25' fill='%23fff' opacity='0.2'/%3E%3Ccircle cx='40' cy='40' r='8' fill='%23333'/%3E%3C/svg%3E" alt="Álbum">
          <div class="card-play-btn">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M8 5v14l11-7z"/>
            </svg>
          </div>
        </div>
        <div class="card-info">
          <h4 class="card-title">Ondas Estelares</h4>
          <p class="card-artist">Colectivo Cósmico</p>
          <span class="card-duration">3:45</span>
        </div>
        <div class="card-actions">
          <button class="action-btn" aria-label="Me gusta">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
            </svg>
          </button>
          <button class="action-btn" aria-label="Más">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>
            </svg>
          </button>
        </div>
      </div>
      
      <div class="music-card" data-title="Noches de Neón" data-artist="Sociedad Synthwave" data-album="Futuro Retro" data-duration="5:28">
        <div class="card-album-art">
          <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cdefs%3E%3ClinearGradient id='grad4' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23fd79a8;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23fdcb6e;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='80' height='80' fill='url(%23grad4)'/%3E%3Ccircle cx='40' cy='40' r='25' fill='%23fff' opacity='0.2'/%3E%3Ccircle cx='40' cy='40' r='8' fill='%23333'/%3E%3C/svg%3E" alt="Álbum">
          <div class="card-play-btn">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M8 5v14l11-7z"/>
            </svg>
          </div>
        </div>
        <div class="card-info">
          <h4 class="card-title">Noches de Neón</h4>
          <p class="card-artist">Sociedad Synthwave</p>
          <span class="card-duration">5:28</span>
        </div>
        <div class="card-actions">
          <button class="action-btn liked" aria-label="No me gusta">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
            </svg>
          </button>
          <button class="action-btn" aria-label="Más">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>
            </svg>
          </button>
        </div>
      </div>
      
      <div class="music-card" data-title="Brisa del Océano" data-artist="Colectivo Ambiental" data-album="Sonidos de la Naturaleza" data-duration="6:15">
        <div class="card-album-art">
          <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cdefs%3E%3ClinearGradient id='grad5' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%2300b894;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%2300cec9;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='80' height='80' fill='url(%23grad5)'/%3E%3Ccircle cx='40' cy='40' r='25' fill='%23fff' opacity='0.2'/%3E%3Ccircle cx='40' cy='40' r='8' fill='%23333'/%3E%3C/svg%3E" alt="Álbum">
          <div class="card-play-btn">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M8 5v14l11-7z"/>
            </svg>
          </div>
        </div>
        <div class="card-info">
          <h4 class="card-title">Brisa del Océano</h4>
          <p class="card-artist">Colectivo Ambiental</p>
          <span class="card-duration">6:15</span>
        </div>
        <div class="card-actions">
          <button class="action-btn" aria-label="Me gusta">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
            </svg>
          </button>
          <button class="action-btn" aria-label="Más">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>
            </svg>
          </button>
        </div>
      </div>
    </div>
  </div>
</div>

              
214líneas
11945caracteres
HTMLIdioma

Compatibilidad del Navegador

Chrome

>= 60

Firefox

>= 55

Safari

>= 10

Edge

>= 15

Fragmentos de Código Relacionados

Explora packs de plantillas

¿Necesitas bloques más grandes? Descubre landings y colecciones de componentes.

Abrir la biblioteca de plantillas ->