animate.cssの機能「delay slow fast」

animate.cssに機能が追加されていたので紹介します。

このページのサンプルは、画面に表示されたらアニメーションを実行するように設定しています。

スポンサーリンク

animate.cssの機能「delay slow fast」

animate.cssのクラス[delay slow fast]を設定したサンプルで、それぞれの動作を紹介します。

1. delay

animate.cssのクラスに delay を追加することで、アニメーションの開始するタイミングを変更できます。

HTML
<div class="animated bounce">sample_img</div>

default
通常時のアニメーションです。

bounce
HTML
<div class="animated bounce delay-2s">sample_img</div>

delay-2s
画面に表示されてから2秒後にアニメーションを実行します。

bounce
HTML
<div class="animated bounce delay-3s">sample_img</div>

delay-3s
画面に表示されてから3秒後にアニメーションを実行します。

bounce
HTML
<div class="animated bounce delay-4s">sample_img</div>

delay-4s
画面に表示されてから4秒後にアニメーションを実行します。

bounce
HTML
<div class="animated bounce delay-5s">sample_img</div>

delay-5s
画面に表示されてから5秒後にアニメーションを実行します。

bounce

2. slow

animate.cssのクラスに slow を追加することで、アニメーションのスピードを遅くすることができます。

HTML
<div class="animated bounceInLeft">sample_img</div>

default
デフォルトの場合、アニメーションの時間は 1s です。

InLeft
HTML
<div class="animated bounceInLeft slow">sample_img</div>

slow
slowを設定すると、アニメーションの時間は 2s となります。

InLeft
HTML
<div class="animated bounceInLeft slower">sample_img</div>

slower
slowerを設定すると、アニメーションの時間は 3s となります。

InLeft

3. fast

animate.cssのクラスに fast を追加することで、アニメーションのスピードを速くすることができます。

HTML
<div class="animated flash">sample_img</div>

default
デフォルトの場合、アニメーションの時間は 1s です。

flash
HTML
<div class="animated flash fast">sample_img</div>

fast
fastを設定すると、アニメーションの時間は 0.8s となります。

flash
HTML
<div class="animated flash faster">sample_img</div>

faster
fasterを設定すると、アニメーションの時間は 0.5s となります。

flash
タイトルとURLをコピーしました