MOTION / 030

Wipe right

左から幕が開く
左端から右端へ、見える範囲が広がります。

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

ラボで詳しく試す ↗

ひとつ試すなら

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

こんなときに

画像や見出しを、方向を持たせて紹介するとき。

仕組みと使い方

要素を移動せず、clip-pathで見える範囲だけを変えます。

ワイプ左からマスクreveal
実装コードを見る
<div class="demo">good</div>

<style>
.demo {
  display: inline-block; font: 900 64px/1.2 Arial, sans-serif; letter-spacing: -4px;
  color: #30323c;
  animation: wipe-right 1200ms ease-in-out infinite both;
}

@keyframes wipe-right {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .demo { animation: none; }
}
</style>