Styledex
← Index

Parallax Sections

视差滚动

stylekitMITDashboard · dashboardProfessional · professionalLight · lightMedium · mediumBlue · blueVivid · vividSerif · serifGeneral · general

通过固定背景和滚动内容创造深度视差效果的沉浸式布局,每个全屏区块都有独立的背景层,适合品牌故事、产品展示和沉浸式体验页面。

NNorthwind
Product · Pricing
Specimen
Make the work feel finished

One interface, dressed in this style. Compare type, color, radius, and density.

128
Active
4.8
Score
12ms
Edge

Attribution

"Parallax Sections" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86.

https://github.com/AnxForever/stylekit · api/styles/parallax-sections · bfa7da909e86 · © AnxForever

Do

  • 使用 bg-fixed 创造固定背景视差效果
  • 每个区块使用 min-h-screen 全屏高度
  • 内容区使用半透明背景 bg-white/90 增强可读性
  • 使用 sticky top-0 创造粘性滚动效果
  • 背景图片使用 bg-cover bg-center 保证比例
  • 过渡区块使用渐变或模糊效果
  • 交互优先通过透明度和 blur 变化表达景深,避免大位移动画引发眩晕
  • 卡片可加入缓慢扫光层(Glass Glare)增强镜头反光感

Don't

  • 禁止背景图片和内容对比度不足
  • 禁止区块高度不一致破坏节奏
  • 禁止过多视差层级造成性能问题
  • 禁止忽略移动端的视差降级处理
  • 禁止内容过于密集破坏焦点
  • 禁止卡片 hover 大幅上下跳动(背景已有位移,前景应克制)
  • 禁止短促急促动画(会破坏沉浸叙事)

Prompt

Create a SaaS landing page using Parallax Sections style with hero section, feature grid, testimonials, pricing table, and footer.

---
"Parallax Sections" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86.
powered by Styledex — https://styledex.dev

Tokens

DTCG

{
  "$schema": "https://www.designtokens.org/schemas/2025.10/format.json",
  "$description": "Parallax Sections. \"Parallax Sections\" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86.",
  "$extensions": {
    "dev.styledex": {
      "id": "stylekit-parallax-sections",
      "license": "MIT",
      "attribution": "\"Parallax Sections\" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86.",
      "banner": "powered by Styledex — https://styledex.dev"
    }
  },
  "color": {
    "background": {
      "$type": "color",
      "$value": "#1e3a5f"
    },
    "foreground": {
      "$type": "color",
      "$value": "#ffffff"
    },
    "card": {
      "$type": "color",
      "$value": "#1e3a5f"
    },
    "card-foreground": {
      "$type": "color",
      "$value": "#ffffff"
    },
    "primary": {
      "$type": "color",
      "$value": "#1e3a5f"
    },
    "primary-foreground": {
      "$type": "color",
      "$value": "#fafaf9"
    },
    "secondary": {
      "$type": "color",
      "$value": "#f8fafc"
    },
    "secondary-foreground": {
      "$type": "color",
      "$value": "#ffffff"
    },
    "accent": {
      "$type": "color",
      "$value": "#3b82f6"
    },
    "accent-foreground": {
      "$type": "color",
      "$value": "#fafaf9"
    },
    "muted": {
      "$type": "color",
      "$value": "#2c4669"
    },
    "muted-foreground": {
      "$type": "color",
      "$value": "#a6a6a6"
    },
    "border": {
      "$type": "color",
      "$value": "#3e5675"
    },
    "destructive": {
      "$type": "color",
      "$value": "#dc2626"
    },
    "ring": {
      "$type": "color",
      "$value": "#1e3a5f"
    }
  },
  "font": {
    "sans": {
      "$type": "fontFamily",
      "$value": [
        "ui-sans-serif",
        "system-ui",
        "sans-serif"
      ]
    },
    "serif": {
      "$type": "fontFamily",
      "$value": [
        "ui-serif",
        "Georgia",
        "serif"
      ]
    },
    "mono": {
      "$type": "fontFamily",
      "$value": [
        "ui-monospace",
        "SFMono-Regular",
        "Menlo",
        "monospace"
      ]
    }
  },
  "radius": {
    "base": {
      "$type": "dimension",
      "$value": "0.5rem"
    }
  },
  "spacing": {
    "base": {
      "$type": "dimension",
      "$value": "1rem"
    }
  },
  "shadow": {
    "base": {
      "$type": "shadow",
      "$value": "0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)"
    }
  }
}

CSS

/* powered by Styledex — https://styledex.dev */
/* "Parallax Sections" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86. */
:root {
  --background: #1e3a5f;
  --foreground: #ffffff;
  --card: #1e3a5f;
  --card-foreground: #ffffff;
  --primary: #1e3a5f;
  --primary-foreground: #fafaf9;
  --secondary: #f8fafc;
  --secondary-foreground: #ffffff;
  --accent: #3b82f6;
  --accent-foreground: #fafaf9;
  --muted: #2c4669;
  --muted-foreground: #a6a6a6;
  --border: #3e5675;
  --destructive: #dc2626;
  --ring: #1e3a5f;
  --radius: 0.5rem;
  --font-sans: ui-sans-serif, system-ui, sans-serif;
  --font-serif: ui-serif, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --spacing: 1rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}

Tailwind

/* powered by Styledex — https://styledex.dev */
/* "Parallax Sections" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86. */
/** Tailwind theme extend for Parallax Sections (stylekit-parallax-sections) */
module.exports = {
  "theme": {
    "extend": {
      "colors": {
        "background": "#1e3a5f",
        "foreground": "#ffffff",
        "card": "#1e3a5f",
        "primary": "#1e3a5f",
        "primary-foreground": "#fafaf9",
        "secondary": "#f8fafc",
        "accent": "#3b82f6",
        "muted": "#2c4669",
        "border": "#3e5675",
        "destructive": "#dc2626",
        "ring": "#1e3a5f"
      },
      "borderRadius": {
        "lg": "0.5rem"
      },
      "fontFamily": {
        "sans": [
          "ui-sans-serif",
          "system-ui",
          "sans-serif"
        ],
        "serif": [
          "ui-serif",
          "Georgia",
          "serif"
        ],
        "mono": [
          "ui-monospace",
          "SFMono-Regular",
          "Menlo",
          "monospace"
        ]
      },
      "boxShadow": {
        "styledex": "0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)"
      }
    }
  }
};

shadcn

/* powered by Styledex — https://styledex.dev */
/* "Parallax Sections" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/parallax-sections @ bfa7da909e86. */
@layer base {
:root {
  --background: #1e3a5f;
  --foreground: #ffffff;
  --card: #1e3a5f;
  --card-foreground: #ffffff;
  --primary: #1e3a5f;
  --primary-foreground: #fafaf9;
  --secondary: #f8fafc;
  --secondary-foreground: #ffffff;
  --accent: #3b82f6;
  --accent-foreground: #fafaf9;
  --muted: #2c4669;
  --muted-foreground: #a6a6a6;
  --border: #3e5675;
  --destructive: #dc2626;
  --ring: #1e3a5f;
  --radius: 0.5rem;
  --font-sans: ui-sans-serif, system-ui, sans-serif;
  --font-serif: ui-serif, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --spacing: 1rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}
}