设计哲学
视差滚动的核心原理:背景固定于视口,内容随页面流动。 两层运动速度的差异产生了空间深度感 —— 就像透过火车窗户望向远山, 近处的树飞速掠过,远处的山却几乎静止。
这种视觉物理原理无需 JavaScript,仅凭一行 CSS:background-attachment: fixed即可实现。每个区块成为独立的「场景」,叙事在滚动中展开。
配色系统
Primary
Blue
Sky
Light
White
核心特性
Parallax Sections 构建在三个相互依存的设计原则上,共同构成沉浸式滚动体验。
Background and foreground move at different rates. The eye perceives a three-dimensional space with zero JavaScript.
Background and foreground move at different rates. The eye perceives a three-dimensional space with zero JavaScript.
Full-screen sections pace the user's journey. Each scroll reveals a new emotional register — like chapters in a film.
Semi-transparent overlays and backdrop-blur keep text legible against any gradient, maintaining WCAG contrast ratios.
UI 组件
按钮 Button
Scroll to reveal layered storytelling. Foreground stays calm while background depth keeps moving.
bg-black/40 backdrop-blur-md · Glass Glare on hover
全屏区块配合固定背景,营造如海浪涌动般的深度感知体验。
背景、内容、装饰三层以不同速率运动,仿佛身处立体空间之中。
backdrop-blur 与半透明白色叠加,让内容卡片漂浮于渐变宇宙之上。
表单 Form · 玻璃输入
通知 Alerts
bg-fixed 是视差效果的核心,确保背景固定于视口。
移动端 iOS Safari 需使用 JS 降级方案。
渐变覆盖层保证文字对比度 WCAG AA 标准。
避免超过 6 个视差层级影响性能。
下拉菜单 Dropdown
标签 Tags
技术规范
Tailwind's bg-fixed maps to background-attachment: fixed in CSS. The background gradient is positioned relative to the viewport. As the user scrolls, the element's content moves while the background stays put — producing the parallax illusion without any JavaScript.
<section
className="relative min-h-screen
bg-fixed bg-cover bg-center
flex items-center"
style={{
backgroundImage:
"linear-gradient(135deg, #0f172a, #1e3a5f)"
}}
>
<div className="absolute inset-0 bg-[#1e3a5f]/60" />
<div className="relative z-10 max-w-4xl mx-auto px-6">
{/* content */}
</div>
</section>Section Height
min-h-screen
Every section fills the full viewport height
Background Lock
bg-fixed
background-attachment: fixed — the parallax engine
Nav Z-Index
z-50
fixed + backdrop-blur-lg stays above all layers
Content Card
bg-white/90
+ backdrop-blur-sm rounded-2xl shadow-xl
Overlay Opacity
bg-[#1e3a5f]/55
absolute inset-0 — guarantees text contrast
Content Layer
relative z-10
Higher z-index than the overlay mask
动画节奏规范
Cinematic Slowness
duration-500 ~ 700
保持电影叙事节奏,避免急促感
Glass Glare
opacity 0 → 1 on hover
渐变扫光层模拟镜头反光效果
Decoupled Depth
blur + opacity only
前景避免大幅 Y 轴移动
视觉过渡
区块之间的视觉切换是整个视差体验的关键节点。颜色故事的演变控制了情绪弧度。
本 Showcase 的渐变旅程
Section 1 — Hero
深夜蓝 · 宇宙开幕
Section 2 — Philosophy
皇室蓝 · 概念导入
Section 3 — Features
海洋蓝 · 深度展开
Section 4 — Components
暗板岩 · 技术聚焦
Section 5 — Specs
极夜蓝 · 规范锚定
Section 6 — Transitions
电蓝渐暗 · 过渡本身
Section 7 — Use Cases
深空蓝 · 场景收敛
Footer
接近黑 · 落幕
相邻 section 使用反差较大的渐变,比如深蓝切换到蓝绿,制造强烈的「翻页感」。 每次切换都是一个情绪重置点。
相邻 section 的结尾渐变色与下一个 section 的起始色保持 30% 的色相相近度, 形成流动的视觉丝线。
适用场景
视差滚动最适合需要叙事节奏和情感深度的场景 —— 让每次滚动都成为一次发现。
Walk visitors through a narrative arc — each section reveals a chapter as they scroll, with the background providing emotional context.
Layer product imagery against fixed environments to simulate a studio shoot unfolding in motion.
Separate creative projects into full-screen scenes. Recruiters experience deliberate pacing rather than an overwhelming grid.
Anchor sections become natural conversion points — the fixed background keeps branding visible while CTAs scroll into view.
Long-form editorial content stays engaging when each section change feels like turning a page in a richly illustrated book.
Countdown, schedule, and registration flow across depth layers, giving a sense of arrival at a physical venue.
设计规则
每周推送新增风格、技术笔记和设计案例。