2016-09-19 25 views
0

CSSアニメーションを再起動する前に少し時間がかかることがありましたが、まだ結果が得られませんでした(how make a looped animation wait using css3CSS Animation Delay in Between Loop)。CSSアニメーションのループに遅延を追加する

私はCSSの新人です。あなたに私にいくつかの指針を示唆してくれることを願っています。次

i { 
    font-style: normal; 
    padding: 0 0.25em; 
    -webkit-transform: scale(0) translate3d(0, -2000px, 0); 
     -moz-transform: scale(0) translate3d(0, -2000px, 0); 
     -ms-transform: scale(0) translate3d(0, -2000px, 0); 
     -o-transform: scale(0) translate3d(0, -2000px, 0); 
      transform: scale(0) translate3d(0, -2000px, 0); 
    background: rgba(255, 255, 255, 0.3); 
    border-radius: 50%; 
} 
i.fly-in-out { 
    -webkit-animation: fly-in-out 3s infinite ease-in-out 4s; 
     -moz-animation: fly-in-out 3s infinite ease-in-out 4s; 
     -o-animation: fly-in-out 3s infinite ease-in-out 4s; 
      animation: fly-in-out 3s infinite ease-in-out 4s; 
} 


@keyframes fly-in-out { 
    0% { 
     transform: scale(0) translate3d(0, -2000px, 0); 
     background: rgba(255, 255, 255, 0.3); 
     box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.2); 
     border-radius: 50%; 
    } 
    15%, 85% { 
     color: rgba(255, 255, 255, 0.8); 
     text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); 
     transform: scale(1) translate3d(0, 0, 0); 
     background: transparent; 
     box-shadow: none; 
    } 
    100% { 
     color: transparent; 
     transform: scale(0) translate3d(0, 2000px, 0); 
     background: rgba(255, 255, 255, 0.3); 
     box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.2); 
     border-radius: 50%; 
    } 
} 
+0

どこ 'アニメーション-delay'を指定しませんでした?それは基本的なことだと思います。 –

+0

"4s"は遅延です。私は、この簡略化アニメーションプロパティを使用している人を見ています。それは間違っていますか? – user1984132

+0

2つの似たような値があるので(私はブラウザが同じセンテンスで3と4をどのように区別しているかわかりません)、その短縮形を使用するのは好きではありません。私は、遅延のない省略表現がはるかに好きで、接頭辞付きで 'animation-delay'を追加します。 –

答えて

0

は、アニメーションのこの構文としてそれを試してみてください(私のウェブサイトのために、あなたがhttp://iwaterhealth.com/に行く場合があります)一部のCSSコードである

i { 
     font-style: normal; 
     padding: 0 0.25em; 
     -webkit-transform: scale(0) translate3d(0, -2000px, 0); 
      -moz-transform: scale(0) translate3d(0, -2000px, 0); 
      -ms-transform: scale(0) translate3d(0, -2000px, 0); 
      -o-transform: scale(0) translate3d(0, -2000px, 0); 
       transform: scale(0) translate3d(0, -2000px, 0); 
     background: rgba(255, 255, 255, 0.3); 
     border-radius: 50%; 
    } 
    i.fly-in-out { 
     -webkit-animation: fly-in-out 3s ease-in-out 8s infinite; 
      -moz-animation: fly-in-out 3s ease-in-out 8s infinite; 
      -o-animation: fly-in-out 3s ease-in-out 8s infinite; 
       animation: fly-in-out 3s ease-in-out 8s infinite; 
    } 


    @keyframes fly-in-out { 
     0% { 
      transform: scale(0) translate3d(0, -2000px, 0); 
      background: rgba(255, 255, 255, 0.3); 
      box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.2); 
      border-radius: 50%; 
     } 
     15%, 85% { 
      color: rgba(255, 255, 255, 0.8); 
      text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); 
      transform: scale(1) translate3d(0, 0, 0); 
      background: transparent; 
      box-shadow: none; 
     } 
     100% { 
      color: transparent; 
      transform: scale(0) translate3d(0, 2000px, 0); 
      background: rgba(255, 255, 255, 0.3); 
      box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.2); 
      border-radius: 50%; 
     } 
    } 
+0

私は提案通りに修正しました。しかし、各反復のエフェクトの後もまだ停止していません。 (あなたは効果を見てiwaterhealth.comを訪問するかもしれません。私が達成したいのは、テキストアニメーションを一時的に一時停止してから再び表示を開始することです) – user1984132

+0

私はクロムF12のCSSを "animation:fly-イン・アウト8秒無限イージー・イン・アウト;その効果は私が望んだものに非常に似ています。 – user1984132

関連する問題