字体加载
用 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/