指南 / 字体排印

字体加载

用 font-display: swap:先显示系统字体, webfont 到了再换,别白屏等。

在线演示

优先显示系统字体
font-display: swap

实现提示词

标准

Load webfonts with font-display: swap so system fonts render immediately and swap when ready.

含动效

Load webfonts with font-display: swap. Add a subtle cross-fade when the webfont swaps in.
设计规范条目
### Font Loading (#font-loading)

Category: Typography

Use font-display: swap: show system fonts first, swap in the webfont when ready — no blank waiting.

- Do: Load webfonts with font-display: swap so system fonts render immediately and swap when ready

- Avoid: no blank waiting

With motion: Load webfonts with font-display: swap. Add a subtle cross-fade when the webfont swaps in.

Live demo: https://uidesignmd.com/guides/font-loading/

规范包

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

已选指南 0 / 20