指南 / 字体排印

流式字号

用 clamp() 让标题字号随视口平滑缩放:手机不挤、桌面不大得离谱。

在线演示

流体标题
拖动滑块调整缩放

实现提示词

标准

Set display headings with clamp(28px, 5vw, 64px) so type scales fluidly with the viewport.

含动效

Set display headings with clamp(28px, 5vw, 64px). Animate the size transition smoothly on viewport change.
设计规范条目
### Fluid Typography (#fluid-type)

Category: Typography

Use clamp() for fluid type that scales smoothly with the viewport — not cramped on mobile, not huge on desktop.

- Do: Set display headings with clamp(28px, 5vw, 64px) so type scales fluidly with the viewport

With motion: Set display headings with clamp(28px, 5vw, 64px). Animate the size transition smoothly on viewport change.

Live demo: https://uidesignmd.com/guides/fluid-type/

规范包

从所选指南中导出实现规则和链接。

已选指南 0 / 20