js+css实现音频声音变速变调音量调节调整保存导出代码

代码语言:html

所属分类:多媒体

代码描述:js+css实现音频声音变速变调音量调节调整保存导出代码

代码标签: js css 音频 声音 变速 变调 音量 调节 调整 保存 导出 代码

下面为部分代码预览,完整代码请点击下载或在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>
    <style>
        :root {
            --bg: #f8f9fc;
            --surface: #ffffff;
            --surface2: #f1f3f8;
            --primary: #5a6ff0;
            --primary-glow: #7b8cf5;
            --accent: #e8577d;
            --accent2: #2da89d;
            --text: #1a1c2e;
            --text-secondary: #5e6072;
            --border: #d9dce6;
            --slider-track: #d9dce6;
            --danger: #d93b4a;
            --success: #1fa363;
            --warning: #e8983e;
            --radius: 12px;
            --radius-sm: 8px;
            --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
            --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
            --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
            background: #f0f2f7;
            background-image:
                radial-gradient(ellipse at 20% 20%, rgba(90, 111, 240, 0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 70%, rgba(232, 87, 125, 0.03) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 50%, rgba(45, 168, 157, 0.02) 0%, transparent 70%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            color: var(--text);
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            -webkit-user-select: none;
        }

        .app-container {
            width: 100%;
            max-width: 880px;
            background: var(--surface);
            border-radius: 20px;
            padding: 32px 28px 24px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
        }

        .app-header {
            text-align: center;
            margin-bottom: 24px;
        }
        .app-header h1 {
            font-size: 1.7rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 4px;
        }
        .app-header .subtitle {
            font-size: 0.85rem;
            color: var(--text-secondary);
            letter-spacing: 0.03em;
        }

        .drop-zone {
            border: 2px dashed var(--border);
            border-radius: var(--radius);
            padding: 36px 20px;
            text-align: center;
            cursor: pointer;
            transition: all var(--transition);
            background: var(--surface2);
            position: relative;
            overflow: hidden;
            margin-bottom: 20px;
            min-height: 100px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .drop-zone:hover,
        .drop-zone.drag-over {
            border-color: var(--primary);
            background: #f0f2ff;
            box-shadow: 0 0 20px rgba(90, 111, 240, 0.12);
            transform: translateY(-1px);
        }
        .drop-zone.drag-over {
            border-color: var(--accent);
            background: #fff0f3;
            box-shadow: 0 0 24px rgba(232, 87, 125, 0.15);
        }
        .drop-zone.has-file {
            border-color: var(--success);
            border-style: solid;
            background: #f4fcf8;
            padding: 16px 20px;
            min-height: auto;
        }
        .drop-zone .icon {
            font-size: 2.8rem;
            opacity: 0.5;
            transition: all var(--transition);
            font-weight: 300;
        }
        .drop-zone.has-file .icon {
            font-size: 1.5rem;
        }
        .drop-zone .drop-text {
            font-size: 0.95rem;
            color: var(--text-secondary);
            transition: all var(--transition);
        }
        .drop-zone .drop-hint {
            font-size: 0.78rem;
            color: #8a8ca0;
        }
        .drop-zone .file-info {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
            font-size: 0.88rem;
            color: var(--text);
        }
        .file-info .badge {
            display: inline-block;
            background: var(--surface2);
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }
        .file-info .badge.highlight {
            background: rgba(90, 111, 240, 0.08);
            border-color: var(--primary);
            color: var(--primary);
        }
        .btn-remove-file {
            background: none;
            border: 1px solid var(--danger);
            color: var(--danger);
            cursor: pointer;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            transition: all var(--transition);
            white-space: nowrap;
        }
        .btn-remove-file:hover {
            background: var(--danger);
            color: #fff;
        }

        .waveform-container {
            position: relative;
            background: var(--surface2);
            border-radius: var(--radius);
            overflow: hidden;
            margin-bottom: 20px;
            border: 1px solid var(--border);
            cursor: pointer;
      .........完整代码请登录后点击上方下载按钮下载查看

网友评论0