MOTION / 017

Rubber band

ゴムのように伸びる
横に伸び、縦に縮み、反動をつけて元に戻ります。

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

ラボで詳しく試す ↗

ひとつ試すなら

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

こんなときに

タップへの反応や、遊び心のあるロゴに。

仕組みと使い方

縦横を逆方向へ変形すると、弾力を感じさせられます。

びよーんゴム弾力rubber
実装コードを見る
<div class="demo"></div>

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

@keyframes rubber-band {
  0% { transform: scale(1,1); }
  25% { transform: scale(1.4,.7); }
  50% { transform: scale(.85,1.2); }
  75% { transform: scale(1.08,.94); }
  100% { transform: scale(1,1); }
}
@media (prefers-reduced-motion: reduce) {
  .demo { animation: none; }
}
</style>