CSS3 アニメーションの特定の部分を順方向に実行した後、逆の順序で実行しようとしています。
私が取得しようとしている部分は、50% から 100% までのキーフレームが前進した後に逆向きになることです。
fallA、fallB、fallC、fallD、fallE の順に 5 つのアニメーションがあり、fallE が完了したら、fallE、fallD、fallC、fallB、fallA に移動する必要があります。ただし、100% から 50% のキーフレームのみです。
CSSまたはjavascript / jqueryでこれを行う方法はありますか?
アニメーションコードは次のとおりです。
.animated.fallA{
-moz-animation: fallA 1s forwards ease-in-out;
-webkit-animation: fallA 1s forwards ease-in-out;
animation: fallA 1s forwards ease-in-out;
}
.animated.fallB{
-moz-animation: fallB 1.2s forwards ease-in-out;
-webkit-animation: fallB 1.2s forwards ease-in-out;
animation: fallB 1.2s forwards ease-in-out;
}
.animated.fallC{
-moz-animation: fallC 1.4s forwards ease-in-out;
-webkit-animation: fallC 1.4s forwards ease-in-out;
animation: fallC 1.4s fowards ease-in-out;
}
.animated.fallD{
-moz-animation: fallD 1.6s forwards ease-in-out;
-webkit-animation: fallD 1.6s forwards ease-in-out;
animation: fallD 1.6s forwards ease-in-out;
}
.animated.fallE{
-moz-animation: fallE 1.8s forwards ease-in-out;
-webkit-animation: fallE 1.8s forwards ease-in-out;
animation: fallE 1.8s forwards ease-in-out;
}
@-moz-keyframes fallA{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:0;
}
}
@-webkit-keyframes fallA{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:0;
}
}
@keyframes fallA{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:0;
}
}
@-moz-keyframes fallB{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-20px;
}
}
@-webkit-keyframes fallB{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-20px;
}
}
@keyframes fallB{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-20px;
}
}
@-moz-keyframes fallC{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-30px;
}
}
@-webkit-keyframes fallC{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-30px;
}
}
@keyframes fallC{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-30px;
}
}
@-moz-keyframes fallD{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-20px;
}
}
@-webkit-keyframes fallD{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-20px;
}
}
@keyframes fallD{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:-20px;
}
}
@-moz-keyframes fallE{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:0;
}
}
@-webkit-keyframes fallE{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:0;
}
}
@keyframes fallE{
0%{
position:relative;
opacity:0.0;
top:-100px;
}
50%{
opacity:1.0;
top:0;
}
100%{
top:0;
}
}