跳到正文
UIGrammer
EN 中文

动画 · 加载与进度 · 06

进度条

进度条 = 进度条从 0 填充到 100%,把不确定的等待变成可衡量、可控的过程。

直达修改 Prompt

Loading…

尊重 prefers-reduced-motion:动画关闭,仅保留终态。

进度条是什么?

进度条把「正在发生」变成「已完成这么多」。已知时长就填到真实百分比;未知时长就循环部分填充,别让它卡在 100% 像坏了。用柔和缓动,长条优先用 transform: scaleX 而非 width 以留在合成层。

动画 标本

触发
load
技术
css
时长
2.2s
缓动
cubic-bezier(0.16, 1, 0.3, 1)
性能
width

什么时候用

  • File uploads, installs, multi-step wizards
  • Onboarding or setup flows with a known step count

什么时候别用

  • Instant actions — a bar that flashes confuses
  • Looping at 100% — it looks broken, not busy

For unknown duration, loop a partial fill (30 to 90%) rather than hitting 100% and stalling.

Build a progress bar that fills 0 to 100% on a 2.2s eased loop; use width for a short bar.