组件 音频播放器 音频播放器组件

音频播放器组件

暗模式音频播放器组件

预览

HTML 代码

<div class="flex items-center justify-center min-h-screen bg-gray-900">
  <div class="container p-6 bg-gray-800 rounded-lg shadow-xl">
    <div class="flex items-center justify-between mb-6">
      <div class="flex items-center">
        <img class="w-12 h-12 mr-4 rounded-full" src="https://randomuser.me/api/portraits/men/1.jpg" alt="Album Art">
        <div>
          <h3 class="text-lg font-semibold text-white">Song Title</h3>
          <p class="text-sm text-gray-400">Artist Name</p>
        </div>
      </div>
      <button class="text-gray-400 hover:text-white focus:outline-none">
        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"></path></svg>
      </button>
    </div>
    <div class="mb-4">
      <div class="flex items-center justify-between text-gray-400">
        <span class="text-xs">0:00</span>
        <span class="text-xs">3:45</span>
      </div>
      <div class="w-full h-2 bg-gray-700 rounded-full">
        <div class="h-2 bg-red-500 rounded-full" style="width: 25%;"></div>
      </div>
    </div>
    <div class="flex items-center justify-center space-x-6">
      <button class="text-gray-400 hover:text-white focus:outline-none">
        <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.75 17.25L10.5 12l5.25-5.25"></path></svg>
      </button>
      <button class="flex items-center justify-center w-12 h-12 text-gray-900 bg-white rounded-full hover:bg-gray-200 focus:outline-none">
        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832L12.364 10 9.555 7.168z" clip-rule="evenodd"></path></svg>
      </button>
      <button class="text-gray-400 hover:text-white focus:outline-none">
        <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17.25L14.25 12 9 6.75"></path></svg>
      </button>
    </div>
  </div>
</div>

相关组件

Retro_Gaming_Audio_Player

专为游戏网站设计的复古/复古主题音频播放器组件,具有互补的配色方案、响应式布局和深色模式支持。它通过盒式磁带视觉效果模仿 80 年代/90 年代的美学。

打开

Audio Player 组件

具有三色配色方案和中等复杂性的粗野派音频播放器组件,适用于仪表板。它具有响应式设计,支持深色主题,并通过 Tailwind CSS 实现。

打开

Monospace Audio Player 组件

一个复杂的响应式音频播放器组件,采用等宽/开发人员美学设计,适用于活动和会议网站。具有进度条、控件和跟踪信息,并支持深色模式。

打开