动画不能在第一次加载时工作

时间:2016-01-20 10:19:23

标签: javascript jquery html css angularjs

我需要逐个动画元素。它使用ng-enter-staggerng-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;
}

0 个答案:

没有答案