EASING / 148

Steps

4段階で、かくっと進む
滑らかに移動せず、時間を4つに区切って段階的に進みます。

実際のHTML・CSSで描かれた見本です。

ラボで詳しく試す ↗

ひとつ試すなら

どこが変わるかを観察して、似た表現と見比べてみよう。

こんなときに

コマ送り、スプライト、段階のある変化を見せるとき。

仕組みと使い方

jump-endは各区間の終わりで進みます。開始直後は動かず、最後の瞬間に終点へ到着します。

イージング速度加速減速段階かくかくコマ送り
実装コードを見る
<div class="demo"></div>

<style>
.demo {
  width: 85px; height: 85px; border-radius: 50%;
  color: #30323c;
  background: #30323c;
  animation: easing-steps-4 1800ms steps(4, jump-end) infinite both;
}

@keyframes easing-steps-4 {
  0% { transform: translateX(-80px); }
  100% { transform: translateX(80px); }
}
@media (prefers-reduced-motion: reduce) {
  .demo { animation: none; }
}
</style>