适合场景
immersive / photography / full-bleed
Immersive Photo
摄影即界面。全幅大图铺满视口,文字压在图上、靠可读性遮罩浮起;缓慢的 Ken Burns 推拉让静照呼吸,模糊占位先行、真图渐显。图是内容不是背景,排版为让照片说话而生。
适合场景
immersive / photography / full-bleed
设计重点
每屏一张全幅照片 object-cover 铺满视口,图是主角、UI 让路
注意事项
禁止把照片当纯装饰背景后铺一堆卡片挡住它(图是主角)
Showcase 入口
Showcase 页面的实时预览,点击查看完整体验。
配色方案
Primary
#0C0D10
Secondary
#F4F1EA
Accent 1
#E8B04B
Accent 2
#1A1C22
AI 实现文档
默认用硬性提示词让 AI 直接生成前端;Design Spec 用来理解、改写和审核风格;Creative Brief 用来早期探索方向。
默认使用它:复制后追加具体需求,让 AI 直接生成一致、可落地的前端。
什么时候用
怎么用
STYLEKIT_STYLE_REFERENCE
style_name: 沉浸摄影
style_slug: immersive-photo
style_source: /styles/immersive-photo
# Hard Prompt
## 什么时候用
当你希望 AI 严格按风格规则生成代码时使用。它是生产界面最稳的默认选择。
## 怎么用
- 把完整提示词复制到 ChatGPT、Claude、Cursor 或其他编码助手。
- 在提示词后追加具体产品、页面或组件需求。
- 生成后按禁止项和交互状态检查,确认没有风格漂移。
请严格遵守以下风格规则并保持一致性,禁止风格漂移。
## 执行要求
- 优先保证风格一致性,其次再做创意延展。
- 遇到冲突时以禁止项为最高优先级。
- 输出前自检:颜色、排版、间距、交互是否仍属于该风格。
## Style Rules
# Immersive Photo (沉浸摄影) Design System
> 摄影即界面。全幅大图铺满视口,文字压在图上、靠可读性遮罩浮起;缓慢的 Ken Burns 推拉让静照呼吸,模糊占位先行、真图渐显。图是内容不是背景,排版为让照片说话而生。
## 核心理念
沉浸摄影的信条:照片不是配图,是主角。当一张全幅大图铺满视口,界面就退居其后——文字只是压在光影上的说明,UI 是为了不挡住照片而存在。
核心理念:
- 图即内容:每屏一张能独立成立的照片,占满视口(full-bleed)。它承担情绪、色调与信息,排版为它让路
- 可读性遮罩(scrim):文字压图必须先铺一层渐变暗罩或局部模糊,保证 4.5:1 对比。scrim 是纪律不是可选项
- Ken Burns:静照用极缓慢的 scale + translate 推拉(8-20s),让照片有呼吸感,但绝不快到让人眩晕
- 渐进加载:先上 LQIP 模糊占位(20px 内联 base64),真图 decode 后交叉淡入。首屏永不白屏
- 从图取色:唯一强调色从照片里采一支暖光(如琥珀金 #E8B04B),别硬塞品牌色
- 留白即呼吸:满图段落之间要有安静的纯色/纯文字段,否则视觉过载
设计原则:
- 性能红线:图用 AVIF + WebP 双格式、responsive srcset、hero 之外全部 lazy;显式 aspect-ratio 防 CLS;Ken Burns 只用 transform(合成器层)
- 无障碍红线:所有图有意义的 alt;prefers-reduced-motion 下 Ken Burns 停、交叉淡入变瞬时;scrim 保证文字对比达标
- LCP 纪律:首屏 hero 图 preload + fetchpriority=high,其余 loading=lazy + decoding=async
- 移动端:竖屏用 object-fit: cover + 焦点对齐,绝不拉伸变形
---
## Token 字典(精确 Class 映射)
### 边框
```
宽度: border
颜色: border-white/25
圆角: rounded-2xl
```
### 阴影
```
小: shadow-[0_2px_8px_rgba(0,0,0,0.3)]
中: shadow-[0_8px_28px_rgba(0,0,0,0.4)]
大: shadow-[0_24px_60px_rgba(0,0,0,0.5)]
悬停: hover:shadow-[0_16px_44px_rgba(0,0,0,0.5)]
聚焦: focus-visible:ring-2 focus-visible:ring-white/60
```
### 交互效果
```
悬停位移: undefined
过渡动画: transition-all duration-300 ease-out
按下状态: active:scale-[0.98]
```
### 字体
```
标题: font-semibold text-white tracking-tight
正文: text-white/80 leading-relaxed
```
### 字号
```
Hero: text-5xl md:text-7xl
H1: text-4xl md:text-6xl
H2: text-3xl md:text-4xl
H3: text-xl md:text-2xl
正文: text-base md:text-lg
小字: text-sm
```
### 间距
```
Section: py-24 md:py-32
容器: px-6 md:px-8
卡片: p-6
```
---
## [FORBIDDEN] 绝对禁止
以下 class 在本风格中**绝对禁止使用**,生成时必须检查并避免:
### 禁止的 Class
- `bg-gradient-to-r`
- `from-indigo-600`
- `via-purple-600`
- `to-pink-500`
- `rounded-none`
- `duration-100`
### 禁止的模式
- 匹配 `^bg-gradient-to-r$`
- 匹配 `^from-(indigo|purple|pink|fuchsia)-`
- 匹配 `^rounded-none$`
### 禁止原因
- `bg-gradient-to-r`: Depth and color come from the photograph, not decorative gradients
- `from-indigo-600`: No AI-cliche gradients; the accent is sampled from the image's light
- `rounded-none`: Full-bleed imagery reads better with soft rounded framing (rounded-2xl)
- `duration-100`: Photo transitions and Ken Burns are slow and cinematic, never snappy
> WARNING: 如果你的代码中包含以上任何 class,必须立即替换。
---
## [REQUIRED] 必须包含
### 按钮必须包含
```
bg-white/12 backdrop-blur-md
border border-white/30
rounded-full
text-white
hover:bg-white/20 hover:border-white/50
transition-all duration-300
```
### 卡片必须包含
```
relative overflow-hidden
rounded-2xl
```
### 输入框必须包含
```
bg-white/10 backdrop-blur-md
border border-white/25
rounded-full
text-white placeholder-white/50
focus:outline-none focus:border-white/60 focus:bg-white/15
transition-all 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="bg-white/12 backdrop-blur-md border border-white/30 rounded-full text-white hover:bg-white/20 hover:border-white/50 transition-all duration-300 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="relative overflow-hidden rounded-2xl p-6">
<h3 class="font-semibold text-white tracking-tight text-xl md:text-2xl">标题</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-white/10 backdrop-blur-md border border-white/25 rounded-full text-white placeholder-white/50 focus:outline-none focus:border-white/60 focus:bg-white/15 transition-all 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 an immersive photo travelogue with:
1. Full-screen hero photo with a slow Ken Burns drift (transform scale 1->1.12, 18s ease-in-out alternate), an LQIP blur-up placeholder that cross-fades to the real frame, and a bottom-to-top scrim
2. Ink #0C0D10 / paper #F4F1EA solid sections between the photo passages for breath
3. Chapter kickers and one CTA in amber #E8B04B sampled from the light; everything else white/white-80 over imagery
4. A gallery of full-bleed photo cards (aspect-[4/5]) that scale slightly on hover, each with a gradient scrim caption
5. Images as <picture> AVIF+WebP with srcset; hero fetchpriority=high, rest loading=lazy decoding=async; explicit aspect-ratio to avoid CLS
6. Frosted (backdrop-blur) nav and buttons that stay legible over any photo
7. prefers-reduced-motion: Ken Burns off, fades instant; meaningful alt on every image
```
### 2. 产品摄影落地页
大图沉浸式产品落地页
```
Create an immersive product landing page with:
1. A full-bleed product hero photo, Ken Burns on load, LQIP blur-up, and a left-anchored scrim so the headline stays readable
2. Alternating sections: full-bleed lifestyle photo, then a quiet ink/paper text section, repeating
3. Amber #E8B04B for the single buy CTA and price highlight only; all other text white over scrims
4. Photo detail cards with aspect-ratio locked and hover scale-105
5. <picture> AVIF+WebP srcset, hero preloaded fetchpriority=high, rest lazy
6. A frosted sticky buy-bar (backdrop-blur) that floats over the imagery
7. reduced-motion: no Ken Burns, instant cross-fades; every image has descriptive alt
```
## 绝对禁止(匹配即拒绝)
以下模式一旦出现,视为风格违规——不找借口,直接重写。
- 把照片当纯装饰背景后铺一堆卡片挡住它(图是主角)
- 文字直接压在图上不加遮罩(读不清 + 对比不达标)
- 用未优化大图(必须 AVIF/WebP + srcset,绝不首屏加载多张全尺寸 JPG)
- Ken Burns 过快或改布局属性(只用 transform,8s 起步)
- 无 aspect-ratio 直接塞图(触发 CLS)
- 多个强调色,禁止硬塞与照片冲突的品牌色
- 省略 LQIP 占位(首屏白屏 / 跳版)与 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 标题上面
- [ ] 禁止把照片当纯装饰背景后铺一堆卡片挡住它(图是主角)
- [ ] 禁止文字直接压在图上不加遮罩(读不清 + 对比不达标)
- [ ] 禁止用未优化大图(必须 AVIF/WebP + srcset,绝不首屏加载多张全尺寸 JPG)
- [ ] 禁止 Ken Burns 过快或改布局属性(只用 transform,8s 起步)
- [ ] 禁止无 aspect-ratio 直接塞图(触发 CLS)在你的工作流里用它
一行命令,把这个风格的主题装进现有 shadcn 项目。
npx shadcn add https://www.stylekit.top/r/immersive-photo.json贡献者可在本地仓库构建尚未发布的 CLI。
pnpm --filter stylekit-cli build && node packages/cli/dist/index.js add immersive-photo贡献者可在本地仓库预览「沉浸摄影」的 MCP 能力。
pnpm --filter stylekit-mcp build && node packages/mcp/dist/index.js组件模板
Frosted button that stays legible over any photo
真实前端完成度
这层检查这个风格是否已经具备真实网站常见的主题、状态反馈、键盘可访问性和性能约束。
总体覆盖
51%
Fallback 规则
暗色模式
0%
缺失组件状态
79%
部分动效规则
70%
部分可访问性
70%
部分性能代价
35%
通用按钮
默认 / 悬停 / 键盘焦点 / 按下 / 禁用
输入框
默认 / 悬停 / 键盘焦点 / 禁用 / 错误
卡片
默认 / 悬停 / 键盘焦点 / 加载中 / 骨架屏
表单
默认 / 键盘焦点 / 禁用 / 加载中 / 错误
/* Immersive Photo Global Styles */
:root {
--ip-ink: #0C0D10;
--ip-paper: #F4F1EA;
--ip-amber: #E8B04B;
--ip-mist: #B8BCC4;
}
/* Ken Burns — transform only, compositor-friendly */
@keyframes ip-kenburns {
from { transform: scale(1) translate3d(0, 0, 0); }
to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); }
}
.ip-kenburns {
animation: ip-kenburns 18s ease-in-out infinite alternate;
will-change: transform;
}
/* Full-bleed image base — always cover, explicit ratio at call site to avoid CLS */
.ip-cover {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
/* Readability scrim presets */
.ip-scrim-bottom { background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.15) 45%, transparent 70%); }
.ip-scrim-full { background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.35)); }
/* Blur-up: LQIP is a scaled-up tiny image; real frame fades in on load */
.ip-lqip { filter: blur(16px); transform: scale(1.06); }
.ip-frame { opacity: 0; transition: opacity 0.8s ease; }
.ip-frame[data-loaded="true"] { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
.ip-kenburns { animation: none; }
.ip-frame { transition: none; }
}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 的技能包
沉浸摄影的信条:照片不是配图,是主角。当一张全幅大图铺满视口,界面就退居其后——文字只是压在光影上的说明,UI 是为了不挡住照片而存在。
基于颜色对比度和排版可读性的 WCAG 2.1 合规分析。
综合评分
等级: B - 良好
对比度
| 场景 | 颜色 | 比率 | AA | AAA |
|---|---|---|---|---|
| Text on background | /#ffffff / #0C0D10 | 19.43:1 | ||
| Text on secondary background | /#ffffff / #1A1C22 | 17.03:1 | ||
| Text on accent 1 | /#ffffff / #E8B04B | 1.95:1 |
可读性
分数
85/100
字号
text-base md:text-lg
字重
font-semibold text-white tracking-tight
行高
default
评分基于 WCAG 2.1 标准。AA 级要求普通文本对比度 4.5:1、大文本 3:1;AAA 级要求普通文本 7:1、大文本 4.5:1。