我需要逐个动画元素。它使用ng-enter-stagger
和ng-leave-stagger
逐个工作,但在加载时动画不会到来。
这是代码:
HTML
<div ng-repeat='animate in animations' ng-class='animation'>Test</div>
css
.animation.ng-enter-stagger, .animation.ng-leave-stagger, .animation.ng-move-stagger {
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
-webkit-animation-duration: 0;
animation-duration: 0;
}
.animation.ng-enter {
-webkit-animation:2s ease-in-out all;
animation:2s ease-in-out all;
animation-name:flipInX;
-webkit-animation-name:flipInX;
}
.flipInAni.ng-enter.ng-enter-active {
animation-name:flipInX;
-webkit-animation-name:flipInX;
}
.animation.ng-leave {
-webkit-animation:1s ease-in-out all;
animation:1s ease-in-out all;
animation-name:flipOutX;
-webkit-animation-name:flipInX;
}
.animation.ng-leave.ng-leave-active {
animation-name:flipOutX;
-webkit-animation-name:flipOutX;
}