适合场景
parallax / editorial / magazine
Parallax Editorial
有物理纵深的杂志排版。暖纸底色上,前景文字与背景层以不同速率滚动,制造真实的层叠景深;sticky 图文交错、章节编号、首字下沉,把长内容读成一场有节奏的翻页。
适合场景
parallax / editorial / magazine
设计重点
暖纸底色 #F5F0E6,正文近黑墨 #1A1712,营造印刷纸感
注意事项
禁止在 scroll 事件里直接改 top / margin / height(触发重排卡顿)——视差只用 transform
Showcase 入口
Showcase 页面的实时预览,点击查看完整体验。
配色方案
Primary
#1A1712
Secondary
#F5F0E6
Accent 1
#B3401F
Accent 2
#2E2A22
AI 实现文档
默认用硬性提示词让 AI 直接生成前端;Design Spec 用来理解、改写和审核风格;Creative Brief 用来早期探索方向。
默认使用它:复制后追加具体需求,让 AI 直接生成一致、可落地的前端。
什么时候用
怎么用
STYLEKIT_STYLE_REFERENCE
style_name: 视差杂志
style_slug: parallax-editorial
style_source: /styles/parallax-editorial
# Hard Prompt
## 什么时候用
当你希望 AI 严格按风格规则生成代码时使用。它是生产界面最稳的默认选择。
## 怎么用
- 把完整提示词复制到 ChatGPT、Claude、Cursor 或其他编码助手。
- 在提示词后追加具体产品、页面或组件需求。
- 生成后按禁止项和交互状态检查,确认没有风格漂移。
请严格遵守以下风格规则并保持一致性,禁止风格漂移。
## 执行要求
- 优先保证风格一致性,其次再做创意延展。
- 遇到冲突时以禁止项为最高优先级。
- 输出前自检:颜色、排版、间距、交互是否仍属于该风格。
## Style Rules
# Parallax Editorial (视差杂志) Design System
> 有物理纵深的杂志排版。暖纸底色上,前景文字与背景层以不同速率滚动,制造真实的层叠景深;sticky 图文交错、章节编号、首字下沉,把长内容读成一场有节奏的翻页。
## 核心理念
视差杂志的信条:滚动是翻页,深度是版面的第四维。当前景与背景以不同速率移动,平面的网页第一次有了纸张的厚度——读者不是划过屏幕,而是穿过一叠正在错位滑动的版面。
核心理念:
- 深度即层次:背景层慢、前景层快,速差本身就是视觉层级。近的先走、远的滞后,眼睛自然读出主次
- 排版先于视差:视差是舞台不是主角。字体、栏宽、行高必须先立得住——衬线大标题、舒适的正文测度(65-75 字符/行)、清晰的章节结构
- sticky 交错:图像 sticky 钉住,文字在其上继续滚动;或反之。图文咬合像杂志的对开跨页
- 编辑信号:章节编号、首字下沉(drop cap)、悬挂标点、栏间竖线——这些是杂志的语法,不是装饰
- 克制的强调:砖红 #B3401F 只用于首字下沉、章节号、关键引文和链接,正文永远是近黑墨
- 节奏留白:大段留白是呼吸口。视差段落之间必须有安静的纯文字段落,否则晕
设计原则:
- 性能红线:视差只用 transform: translate3d(合成器层),rAF 节流,绝不在 scroll 事件里改 top/margin
- 无障碍红线:prefers-reduced-motion 下所有视差层归零速差、变成普通静态版面,阅读顺序不变
- 景深纪律:一屏最多 3 个视差速率层级,超过就浑浊
- 响应式:移动端大幅削弱或关闭视差(性能 + 眩晕),保留排版与 sticky 结构
---
## Token 字典(精确 Class 映射)
### 边框
```
宽度: border
颜色: border-[#1A1712]/20
圆角: rounded-none
```
### 阴影
```
小: shadow-none
中: shadow-none
大: shadow-[0_24px_60px_rgba(26,23,18,0.12)]
悬停: hover:shadow-[0_30px_70px_rgba(26,23,18,0.16)]
聚焦: focus:shadow-none
```
### 交互效果
```
悬停位移: undefined
过渡动画: transition-colors duration-300 ease-out
按下状态: active:opacity-80
```
### 字体
```
标题: font-serif text-[#1A1712]
正文: text-[#1A1712]/75 leading-relaxed
```
### 字号
```
Hero: text-6xl md:text-8xl
H1: text-4xl md:text-6xl
H2: text-3xl md:text-4xl
H3: text-2xl md:text-3xl
正文: text-base md:text-lg
小字: text-sm
```
### 间距
```
Section: py-20 md:py-32
容器: px-6 md:px-8
卡片: pt-5
```
---
## [FORBIDDEN] 绝对禁止
以下 class 在本风格中**绝对禁止使用**,生成时必须检查并避免:
### 禁止的 Class
- `rounded-lg`
- `rounded-xl`
- `rounded-2xl`
- `rounded-full`
- `bg-white`
- `bg-black`
- `bg-slate-900`
- `bg-gray-900`
- `bg-gradient-to-r`
- `from-indigo-600`
- `via-purple-600`
- `to-pink-500`
- `font-sans`
### 禁止的模式
- 匹配 `^rounded-(lg|xl|2xl|3xl|full)$`
- 匹配 `^bg-(white|black)$`
- 匹配 `^bg-gradient-`
- 匹配 `^bg-(slate|gray|zinc|blue|indigo)-(800|900)$`
### 禁止原因
- `rounded-full`: Editorial layout uses sharp printed edges, not pills
- `bg-white`: Use warm paper #F5F0E6, never sterile pure white
- `bg-black`: Use warm ink #1A1712 on paper, not flat black surfaces
- `bg-gradient-to-r`: Depth comes from parallax layers, not gradients
- `from-indigo-600`: No AI-cliche gradients; warm paper, ink and one brick-red accent
- `font-sans`: Headings and structure lean on a serif display face
> WARNING: 如果你的代码中包含以上任何 class,必须立即替换。
---
## [REQUIRED] 必须包含
### 按钮必须包含
```
font-serif
transition-colors duration-300
hover:text-[#B3401F]
```
### 卡片必须包含
```
border-t border-[#1A1712]/20
rounded-none
pt-5
```
### 输入框必须包含
```
bg-transparent
border-b border-[#1A1712]/25
rounded-none
text-[#1A1712] placeholder-[#1A1712]/30
focus:outline-none focus:border-[#B3401F]
transition-colors duration-300
```
---
## [COMPARE] 错误 vs 正确对比
### 按钮
[WRONG] **错误示例**(使用了圆角和模糊阴影):
```html
<button class="rounded-lg shadow-lg bg-blue-500 text-white px-4 py-2 hover:bg-blue-600">
点击我
</button>
```
[CORRECT] **正确示例**(使用硬边缘、无圆角、位移效果):
```html
<button class="font-serif transition-colors duration-300 hover:text-[#B3401F] bg-[#ff006e] text-white px-4 py-2 md:px-6 md:py-3">
点击我
</button>
```
### 卡片
[WRONG] **错误示例**(使用了渐变和圆角):
```html
<div class="rounded-xl shadow-2xl bg-gradient-to-r from-purple-500 to-pink-500 p-6">
<h3 class="text-xl font-semibold">标题</h3>
</div>
```
[CORRECT] **正确示例**(纯色背景、硬边缘阴影):
```html
<div class="border-t border-[#1A1712]/20 rounded-none pt-5 pt-5">
<h3 class="font-serif text-[#1A1712] text-2xl md:text-3xl">标题</h3>
</div>
```
### 输入框
[WRONG] **错误示例**(灰色边框、圆角):
```html
<input class="rounded-md border border-gray-300 px-3 py-2 focus:ring-2 focus:ring-blue-500" />
```
[CORRECT] **正确示例**(黑色粗边框、聚焦阴影):
```html
<input class="bg-transparent border-b border-[#1A1712]/25 rounded-none text-[#1A1712] placeholder-[#1A1712]/30 focus:outline-none focus:border-[#B3401F] transition-colors duration-300 px-3 py-2 md:px-4 md:py-3" placeholder="请输入..." />
```
---
## [TEMPLATES] 页面骨架模板
使用以下模板生成页面,只需替换 `{PLACEHOLDER}` 部分:
### 导航栏骨架
```html
<nav class="bg-white border-b-2 md:border-b-4 border-black px-4 md:px-8 py-3 md:py-4">
<div class="flex items-center justify-between max-w-6xl mx-auto">
<a href="/" class="font-black text-xl md:text-2xl tracking-wider">
{LOGO_TEXT}
</a>
<div class="flex gap-4 md:gap-8 font-mono text-sm md:text-base">
{NAV_LINKS}
</div>
</div>
</nav>
```
### Hero 区块骨架
```html
<section class="min-h-[60vh] md:min-h-[80vh] flex items-center px-4 md:px-8 py-12 md:py-0 bg-{ACCENT_COLOR} border-b-2 md:border-b-4 border-black">
<div class="max-w-4xl mx-auto">
<h1 class="font-black text-4xl md:text-6xl lg:text-8xl leading-tight tracking-tight mb-4 md:mb-6">
{HEADLINE}
</h1>
<p class="font-mono text-base md:text-xl max-w-xl mb-6 md:mb-8">
{SUBHEADLINE}
</p>
<button class="bg-black text-white font-black px-6 py-3 md:px-8 md:py-4 border-2 md:border-4 border-black shadow-[4px_4px_0px_0px_rgba(255,0,110,1)] md:shadow-[8px_8px_0px_0px_rgba(255,0,110,1)] hover:shadow-none hover:translate-x-[2px] hover:translate-y-[2px] transition-all text-sm md:text-base">
{CTA_TEXT}
</button>
</div>
</section>
```
### 卡片网格骨架
```html
<section class="py-12 md:py-24 px-4 md:px-8">
<div class="max-w-6xl mx-auto">
<h2 class="font-black text-2xl md:text-4xl mb-8 md:mb-12">{SECTION_TITLE}</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6">
<!-- Card template - repeat for each card -->
<div class="bg-white border-2 md:border-4 border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] md:shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] p-4 md:p-6 hover:shadow-[4px_4px_0px_0px_rgba(255,0,110,1)] md:hover:shadow-[8px_8px_0px_0px_rgba(255,0,110,1)] hover:-translate-y-1 transition-all">
<h3 class="font-black text-lg md:text-xl mb-2">{CARD_TITLE}</h3>
<p class="font-mono text-sm md:text-base text-gray-700">{CARD_DESCRIPTION}</p>
</div>
</div>
</div>
</section>
```
### 页脚骨架
```html
<footer class="bg-black text-white py-12 md:py-16 px-4 md:px-8 border-t-2 md:border-t-4 border-black">
<div class="max-w-6xl mx-auto">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div>
<span class="font-black text-xl md:text-2xl">{LOGO_TEXT}</span>
<p class="font-mono text-sm mt-4 text-gray-400">{TAGLINE}</p>
</div>
<div>
<h4 class="font-black text-lg mb-4">{COLUMN_TITLE}</h4>
<ul class="space-y-2 font-mono text-sm text-gray-400">
{FOOTER_LINKS}
</ul>
</div>
</div>
</div>
</footer>
```
---
## [CHECKLIST] 生成后自检清单
**在输出代码前,必须逐项验证以下每一条。如有违反,立即修正后再输出:**
### 1. 圆角检查
- [ ] 搜索代码中的 `rounded-`
- [ ] 确认只有 `rounded-none` 或无圆角
- [ ] 如果发现 `rounded-lg`、`rounded-md` 等,替换为 `rounded-none`
### 2. 阴影检查
- [ ] 搜索代码中的 `shadow-`
- [ ] 确认只使用 `shadow-[Xpx_Xpx_0px_0px_rgba(...)]` 格式
- [ ] 如果发现 `shadow-lg`、`shadow-xl` 等,替换为正确格式
### 3. 边框检查
- [ ] 搜索代码中的 `border-`
- [ ] 确认边框颜色是 `border-black`
- [ ] 如果发现 `border-gray-*`、`border-slate-*`,替换为 `border-black`
### 4. 交互检查
- [ ] 所有按钮都有 `hover:shadow-none hover:translate-x-[2px] hover:translate-y-[2px]`
- [ ] 所有卡片都有 hover 效果(阴影变色或位移)
- [ ] 都包含 `transition-all`
### 5. 响应式检查
- [ ] 边框有 `border-2 md:border-4`
- [ ] 阴影有 `shadow-[4px...] md:shadow-[8px...]`
- [ ] 间距有 `p-4 md:p-6` 或类似的响应式值
- [ ] 字号有 `text-sm md:text-base` 或类似的响应式值
### 6. 字体检查
- [ ] 标题使用 `font-black`
- [ ] 正文使用 `font-mono`
> CRITICAL: **如果任何一项检查不通过,必须修正后重新生成代码。**
---
## [EXAMPLES] 示例 Prompt
### 1. 视差长文特写
有景深的杂志长文页
```
Create a parallax editorial longform feature page with:
1. Warm paper #F5F0E6, ink #1A1712 body, single brick-red #B3401F accent
2. Load Fraunces serif from fonts.loli.net for headings and pull quotes
3. Hero: three parallax layers via transform translate3d — a giant faint background year (rate 0.15), a brick vertical rule (rate 0.4), and static foreground title
4. Chapters numbered with large serif figures and a thin top rule; first paragraph of each uses a brick drop cap
5. One sticky interlock section: an image column pinned while the text column scrolls beside it
6. Body measure capped at 68ch, line-height 1.7
7. Single rAF scroll loop drives all [data-parallax] layers; prefers-reduced-motion sets transform:none and parallax weakens on mobile
```
### 2. 视差品牌故事页
分章节的品牌叙事落地页
```
Create a parallax editorial brand story landing page with:
1. Paper #F5F0E6 stage, ink type, brick #B3401F for chapter numbers and links only
2. Fraunces serif headings; humanist sans body at 70ch measure
3. Four chapters, each with a serif index (01-04), top rule, drop-cap opening paragraph
4. Two sticky interlock sections alternating image-left / image-right, images pinned while copy scrolls
5. A background sand-colored layer drifting at rate 0.12 behind the whole page
6. Pull quote with a left brick rule and large italic serif
7. rAF-throttled parallax, transform-only, reduced-motion static fallback, parallax disabled under 768px
```
## 绝对禁止(匹配即拒绝)
以下模式一旦出现,视为风格违规——不找借口,直接重写。
- 在 scroll 事件里直接改 top / margin / height(触发重排卡顿)——视差只用 transform
- 一屏超过 3 个视差速率层级(景深浑浊)
- 让视差压过可读性:正文永远不做视差主体,测度不超 75 字符
- 移动端保留强视差(性能差 + 眩晕),应削弱或关闭
- 多个强调色,禁止把砖红铺成大面积底色
- 省略 prefers-reduced-motion 降级
- 用冷色/纯白背景(失去暖纸质感)
## 自检清单(交付前逐条确认)
如果任何一条不通过,说明风格漂移了——修改后再交付。
- [ ] 没有紫色到蓝色的渐变
- [ ] 没有使用 Inter / Roboto / Geist 等过度使用的字体
- [ ] 没有嵌套卡片(卡片里面套卡片)
- [ ] 没有在彩色背景上放灰色文字
- [ ] 正文对比度满足 WCAG AA(≥4.5:1)
- [ ] 没有 bounce / elastic 缓动曲线
- [ ] 动效有 prefers-reduced-motion 备选方案
- [ ] 正文行宽不超过 65-75 个字符
- [ ] 没有单侧粗边框装饰(border-left/right accent stripe)
- [ ] 没有渐变文字(background-clip: text)
- [ ] 没有把玻璃态(glassmorphism)当作默认风格
- [ ] 没有 tiny uppercase tracked eyebrow 放在每个 section 标题上面
- [ ] 禁止在 scroll 事件里直接改 top / margin / height(触发重排卡顿)——视差只用 transform
- [ ] 禁止一屏超过 3 个视差速率层级(景深浑浊)
- [ ] 禁止让视差压过可读性:正文永远不做视差主体,测度不超 75 字符
- [ ] 禁止移动端保留强视差(性能差 + 眩晕),应削弱或关闭
- [ ] 禁止多个强调色,禁止把砖红铺成大面积底色在你的工作流里用它
一行命令,把这个风格的主题装进现有 shadcn 项目。
npx shadcn add https://www.stylekit.top/r/parallax-editorial.json贡献者可在本地仓库构建尚未发布的 CLI。
pnpm --filter stylekit-cli build && node packages/cli/dist/index.js add parallax-editorial贡献者可在本地仓库预览「视差杂志」的 MCP 能力。
pnpm --filter stylekit-mcp build && node packages/mcp/dist/index.js组件模板
Editorial link-button with brick underline sweep
真实前端完成度
这层检查这个风格是否已经具备真实网站常见的主题、状态反馈、键盘可访问性和性能约束。
总体覆盖
51%
Fallback 规则
暗色模式
0%
缺失组件状态
79%
部分动效规则
70%
部分可访问性
70%
部分性能代价
35%
通用按钮
默认 / 悬停 / 键盘焦点 / 按下 / 禁用
输入框
默认 / 悬停 / 键盘焦点 / 禁用 / 错误
卡片
默认 / 悬停 / 键盘焦点 / 加载中 / 骨架屏
表单
默认 / 键盘焦点 / 禁用 / 加载中 / 错误
/* Parallax Editorial Global Styles */
:root {
--pe-ink: #1A1712;
--pe-ink-soft: rgba(26, 23, 18, 0.7);
--pe-paper: #F5F0E6;
--pe-paper-deep: #EBE3D3;
--pe-brick: #B3401F;
--pe-sand: #C9BBA0;
--pe-measure: 68ch;
}
body {
background: var(--pe-paper);
color: var(--pe-ink);
}
/* Parallax layers: JS sets --pe-y from scroll progress * rate; transform-only */
[data-parallax] {
transform: translate3d(0, var(--pe-y, 0), 0);
will-change: transform;
}
/* Drop cap */
.pe-dropcap::first-letter {
float: left;
font-family: var(--font-serif), Georgia, serif;
font-size: 3.6em;
line-height: 0.82;
padding: 0.05em 0.12em 0 0;
color: var(--pe-brick);
font-weight: 600;
}
/* Comfortable measure for body copy */
.pe-measure {
max-width: var(--pe-measure);
}
/* Column rule between text blocks */
.pe-rule {
border-top: 1px solid rgba(26, 23, 18, 0.2);
}
@media (prefers-reduced-motion: reduce) {
[data-parallax] {
transform: none !important;
}
}IDE 集成
下载 AI 编码助手的配置文件,使其按照此风格生成代码。
风格包
获取完整的可机器读取风格资源,包括 Design Tokens、Tailwind 预设、CSS 变量和 shadcn/ui 主题。
Metadata
Style metadata including version information
Design Tokens
Figma / Style Dictionary / Tokens Studio 兼容
Tailwind Preset
Tailwind CSS 主题预设,可直接在配置中引用
Global CSS
包含 CSS 变量和基础样式
shadcn Theme
shadcn/ui 主题配置
CSS Variables
纯 CSS 变量,适用于任何项目
SKILL.md
可加载到 Cursor / Claude Code / VS Code 的技能包
视差杂志的信条:滚动是翻页,深度是版面的第四维。当前景与背景以不同速率移动,平面的网页第一次有了纸张的厚度——读者不是划过屏幕,而是穿过一叠正在错位滑动的版面。
基于颜色对比度和排版可读性的 WCAG 2.1 合规分析。
综合评分
等级: B - 良好
对比度
| 场景 | 颜色 | 比率 | AA | AAA |
|---|---|---|---|---|
| Text on background | /#1A1712 / #F5F0E6 | 15.73:1 | ||
| Secondary text on background | /#1A1712 / #F5F0E6 | 15.73:1 | ||
| Muted text on background | /#1A1712 / #F5F0E6 | 15.73:1 | ||
| Text on secondary background | /#1A1712 / #EBE3D3 | 14.01:1 | ||
| Secondary text on secondary | /#1A1712 / #EBE3D3 | 14.01:1 | ||
| Button primary | /#F5F0E6 / #1A1712 | 15.73:1 | ||
| Text on accent 1 | /#1A1712 / #1A1712 | 1:1 | ||
| Alt text on accent 1 | /#1A1712 / #1A1712 | 1:1 |
可读性
分数
80/100
字号
text-base md:text-lg
字重
font-serif text-[#1A1712]
行高
default
评分基于 WCAG 2.1 标准。AA 级要求普通文本对比度 4.5:1、大文本 3:1;AAA 级要求普通文本 7:1、大文本 4.5:1。