css+js实现简洁带播放列表的音乐播放器代码
代码语言:html
所属分类:多媒体
代码描述:css+js实现简洁带播放列表的音乐播放器代码
代码标签: css js 简洁 播放 列表 音乐 播放器 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>移动端音乐播放器</title> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap-icons.1.11.3.css"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; overflow: hidden; } .music-player { width: 100%; max-width: 400px; padding: 20px; text-align: center; } .song-info { margin-bottom: 30px; } .song-title { font-size: 24px; font-weight: 600; margin-bottom: 8px; } .song-artist { font-size: 16px; opacity: 0.8; } .vinyl-container { position: relative; width: 280px; height: 280px; margin: 0 auto 40px; } .vinyl-record { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at center, #1a1a1a 20%, #333 22%, #1a1a1a 24%, #333 26%, #1a1a1a 28%), linear-gradient(45deg, #2a2a2a, #1a1a1a); position: relative; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); transition: transform 0.3s ease; } .vinyl-record.spinning { animation: spin 3s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .record-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; background: #1a1a1a; border: 2px solid #666; } .record-hole { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: #000; } .album-cover { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border-radius: 50%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 48px; box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2); } .progress-container { width: 100%; margin-bottom: 30px; } .progress-bar { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.2); border-radius: 2px; overflow: hidden; margin-bottom: 10px; cursor: pointer; } .progress-fill { height: 100%; background: white; width: 0%; border-radius: 2px; transition: width 0.1s ease; } .time-info { display: flex; justify-content: space-between; font-size: 12px; opacity: 0.7; } .controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 20px; } ..........完整代码请登录后点击上方下载按钮下载查看
网友评论0