示例工程 35-keyframes
35-keyframes/demo-02-multi/index.html
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>多阶段动画</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>多阶段动画</h1>
<p>小球按 0/25/50/75/100% 走方框;进度条用 steps 跳格。</p>
<div class="stage">
<div class="ball" aria-hidden="true"></div>
</div>
<div class="progress" role="progressbar" aria-label="加载进度" aria-valuemin="0" aria-valuemax="100" aria-valuenow="60">
<span class="bar" aria-hidden="true"></span>
</div>
</body>
</html>