MOTION / 023

Orbit

円を描いて巡る
向きを保ったまま、中心のまわりを一周します。

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

ラボで詳しく試す ↗

ひとつ試すなら

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

こんなときに

軌道や周回の関係を説明するとき。

仕組みと使い方

回転・移動・逆回転を重ねると、向きを保って周回できます。

公転軌道円運動orbit
実装コードを見る
<div class="demo"></div>

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

@keyframes orbit {
  0% { transform: rotate(0deg) translateX(42px) rotate(0deg) scale(.55); }
  100% { transform: rotate(360deg) translateX(42px) rotate(-360deg) scale(.55); }
}
@media (prefers-reduced-motion: reduce) {
  .demo { animation: none; }
}
</style>