MOTION / 048

Elastic in

ばねのように収まる
大きさが行き過ぎて戻る動きを繰り返し、徐々に落ち着きます。

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

ラボで詳しく試す ↗

ひとつ試すなら

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

こんなときに

遊び心のある選択反応や、小さな通知の登場に。

仕組みと使い方

これはキーフレームによるばね風の近似で、物理シミュレーションではありません。

ばねびよん弾力elasticspring
実装コードを見る
<div class="demo"></div>

<style>
.demo {
  width: 85px; height: 85px; border-radius: 50%;
  color: #30323c;
  background: #30323c;
  animation: elastic-in 1500ms linear infinite both;
}

@keyframes elastic-in {
  0% { transform: scale(.2); }
  35% { transform: scale(1.3); }
  58% { transform: scale(.84); }
  77% { transform: scale(1.09); }
  90% { transform: scale(.97); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .demo { animation: none; }
}
</style>