适合场景
横滚 / 画廊 / 策展
Horizontal Gallery
给这个风格评分白盒美术馆式的横向滚动作品集布局,无边框大图沿水平展线依次排开,留白即展墙,编号与极细图注还原策展语言,观看是一场步行。
适合场景
横滚 / 画廊 / 策展
设计重点
画廊条带使用 overflow-x-auto snap-x snap-mandatory,每件作品 shrink-0 snap-start
注意事项
禁止给作品图加阴影、圆角或边框(作品必须像直接挂在展墙上一样干净)
design.md
一份文档说明这套风格的配色职责、字体规则、间距与组件构造。复制或下载后直接交给 Claude Code 或 Codex。
白盒展厅:作品沿一条横向轨道排开,看展变成一次散步。
Theme: light
横滚画廊模仿美术馆的白盒展厅:作品沿着一条横向的 snap 滚动轨道排开(overflow-x-auto、snap-x mandatory、每件 shrink-0 snap-start),留白就是展墙,图注用 12px 全大写 0.2em 的灰字放在图外下方并带 No. 01 编号,章节标题作为轨道首格 sticky 在左侧随滚动常驻。它的禁令全部指向「不要让作品被装饰干扰」——不许给作品图加阴影圆角边框、不许把文字压在图上、不许厚重边框、不许花哨背景墙、不许高饱和多色装饰,唯一点缀色是克制的赤陶。
| Name | Value | Token | Role |
|---|---|---|---|
| Ink | #1a1a1a | --color-ink | 标题与主要文字。展签的颜色。 |
| Gallery White | #fcfcfa | --color-gallery-white | 页面底。略暖的白,像刷过漆的展墙。 |
| Terracotta | #a85a3a | --color-terracotta | 唯一点缀色,少量出现在编号、链接与选中标记上。 |
| Stone | #8a8a85 | --color-stone | 图注、编号与元信息。级别最低但必须可读。 |
| Hairline | #e8e6e1 | --color-hairline | 所有 1px hairline,永远不超过 1px。 |
| Dark Stone | #2e2e2c | --color-dark-stone | 反色区块底,用于「关于」与页脚。 |
| Role | Family | Weight | Size | Line Height | Letter Spacing | Token |
|---|---|---|---|---|---|---|
| display | Cormorant Garamond | 300 | 64px | 1.1 | 0.02em | --text-display |
| heading | Cormorant Garamond | 300 | 48px | 1.15 | — | --text-heading |
| subheading | Cormorant Garamond | 400 | 36px | 1.25 | — | --text-subheading |
| body-lg | Inter | 300 | 15px | 1.7 | — | --text-body-lg |
| body | Inter | 300 | 13px | 1.7 | — | --text-body |
| label | Inter | 400 | 12px | 1.5 | 0.2em | --text-label |
Base unit: 8px Density: airy
| Name | Value | Token |
|---|---|---|
| 8 | 8px | --spacing-8 |
| 16 | 16px | --spacing-16 |
| 24 | 24px | --spacing-24 |
| 32 | 32px | --spacing-32 |
| 48 | 48px | --spacing-48 |
| 64 | 64px | --spacing-64 |
| 96 | 96px | --spacing-96 |
| 128 | 128px | --spacing-128 |
| Element | Value |
|---|---|
| cards | 0 |
| buttons | 0 |
| media | 0 |
Role: 横滚轨道(核心结构)
容器 overflow-x: auto、scroll-snap-type: x mandatory、隐藏滚动条但保留键盘与触控可滚。每件作品 shrink-0、scroll-snap-align: start、间距 64px。轨道上下各一条 1px hairline。
Role: 作品格
图片宽度按视口比例(桌面 42vw、平板 60vw、手机 82vw),高度自适应保持原始比例,零圆角零边框零阴影。图片下方 16px 处放图注:12px 全大写 0.2em 的灰石色编号(No. 01)加作品名与年份。图注绝不出现在图上。
Role: 常驻章节标题(首格)
作为轨道的第一个格子,sticky left-0、与页面同色底、宽 320px、右侧 1px hairline。标题 48px 细衬线,下方 12px 全大写章节编号。它随横滚常驻,指明当前章节。
Role: 图注与元信息
12px、字距 0.2em、全大写、灰石 #8a8a85。格式固定为「No. 01 / 作品名 / 年份 / 材质」。编号用赤陶色。它模仿博物馆的展签,绝不加粗也绝不省略编号。
Role: 展墙分隔线
1px、色 #e8e6e1,横跨内容宽,两端各收进 24px。用于分隔不同章节的轨道。绝对不允许 2px 及以上——粗线会让页面变成表格而不是展墙。
| Level | Name | Value | Purpose |
|---|---|---|---|
| 0 | Gallery White | #fcfcfa | 展墙 |
| 1 | Dark Stone | #2e2e2c | 反色区块 |
none — a shadow would mount the work on the wall作品图是唯一内容,必须高质、精确裁切、无滤镜。允许不同尺寸与比例(这正是画廊的节奏),但每件作品都要有编号与展签。不使用装饰插画、背景纹理与多色图形。
上限 1440px,轨道左右内边距 32px,章节间距 160px。垂直方向几乎全是留白,横向承载全部内容。允许轨道在移动端降至 82vw 单件可见。
QUICK COLOR REFERENCE:
#1a1a1a#fcfcfa#a85a3a#8a8a85#e8e6e1#2e2e2cEXAMPLE COMPONENT PROMPTS:
:root {
/* Colors */
--color-ink: #1a1a1a;
--color-gallery-white: #fcfcfa;
--color-terracotta: #a85a3a;
--color-stone: #8a8a85;
--color-hairline: #e8e6e1;
--color-dark-stone: #2e2e2c;
/* Typography — Font Families */
--font-serif: 'Cormorant Garamond', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
/* Typography — Scale */
--text-display: 64px;
--leading-display: 1.1;
--tracking-display: 0.02em;
--text-heading: 48px;
--leading-heading: 1.15;
--text-subheading: 36px;
--leading-subheading: 1.25;
--text-body-lg: 15px;
--leading-body-lg: 1.7;
--text-body: 13px;
--leading-body: 1.7;
--text-label: 12px;
--leading-label: 1.5;
--tracking-label: 0.2em;
/* Typography — Weights */
--font-weight-light: 300;
--font-weight-regular: 400;
/* Spacing */
--spacing-unit: 8px;
--spacing-8: 8px;
--spacing-16: 16px;
--spacing-24: 24px;
--spacing-32: 32px;
--spacing-48: 48px;
--spacing-64: 64px;
--spacing-96: 96px;
--spacing-128: 128px;
/* Layout */
--page-max-width: 1440px;
--section-gap: 160px;
--card-padding: 0px;
--element-gap: 24px;
--density: airy;
/* Border Radius */
--radius-cards: 0;
--radius-buttons: 0;
--radius-media: 0;
/* Surfaces */
--surface-gallery-white: #fcfcfa;
--surface-dark-stone: #2e2e2c;
}
组件模板
无圆角墨黑按钮,大写字母配舒展字距,如同展签上的指令
常见问题
/* Horizontal Gallery Global Styles */
/* Signature horizontal strip: snap scroll with hidden scrollbar */
.hgallery-strip {
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
-ms-overflow-style: none;
}
.hgallery-strip::-webkit-scrollbar {
display: none;
}
.hgallery-item {
flex-shrink: 0;
scroll-snap-align: start;
}
.hgallery-item--center {
scroll-snap-align: center;
}
/* Sticky title cell that walks along with the strip */
.hgallery-sticky-title {
position: sticky;
left: 0;
z-index: 10;
background: #FCFCFA;
}
/* Museum wall label caption */
.hgallery-caption {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.2em;
color: #8A8A85;
}
.hgallery-index {
font-size: 0.625rem;
text-transform: uppercase;
letter-spacing: 0.25em;
color: #A85A3A;
}
/* Hairline rules */
.hgallery-hairline {
border-color: #E8E6E1;
border-width: 1px;
}
/* Hairline scroll progress track */
.hgallery-progress {
position: relative;
height: 1px;
background: #E8E6E1;
}
.hgallery-progress-thumb {
position: absolute;
top: 0;
left: 0;
height: 1px;
background: #1A1A1A;
transition: width 0.2s ease-out;
}
/* Horizontal Gallery Design Tokens */
:root {
--horizontal-gallery-wall: #FCFCFA;
--horizontal-gallery-ink: #1A1A1A;
--horizontal-gallery-ink-soft: #2E2E2C;
--horizontal-gallery-muted: #8A8A85;
--horizontal-gallery-hairline: #E8E6E1;
--horizontal-gallery-terracotta: #A85A3A;
}
@keyframes horizontal-gallery-fade-in {
from { opacity: 0; transform: translateX(16px); }
to { opacity: 1; transform: translateX(0); }
}
.horizontal-gallery-animate-in {
animation: horizontal-gallery-fade-in 0.6s ease-out both;
}兼容的视觉风格
横滚画廊 是一种布局模式,可以与以下视觉风格搭配使用。
相关风格
探索这些风格获取现成的 tokens 和组件。
横滚画廊 和 暗色画廊风 是最接近的两个方向。下表列出它们在配色、适用场景和标签上的实际差异,选之前先看这一栏。
| 维度 | 横滚画廊 | 暗色画廊风 |
|---|---|---|
| 主色 | #1A1A1A | #0A0A0A |
| 辅助色 | #FCFCFA | #FFFFFF |
| 适合场景 | 横滚 / 画廊 / 策展 | 摄影 / 画廊 / 暗色 |
| 独有标签 | — | dark-theme |
Horizontal Gallery(横滚画廊)把网页想象成一座白盒美术馆(White Cube):观看不是向下刷信息流,而是沿着一条展线向前步行,每一步停在一件作品正前方。