我的任务是为项目列表创建级联效果(每个项目都比另一个项目晚几分之一秒)。所以你可以想象当我发现时我是多么兴奋ng-animate
。我已经用 填充了我的列表ng-repeat
,所以看起来就像添加和修改 CSS 一样简单。这就是我的目标:如何在 ngRepeat 中延迟 ngAnimate
但它似乎并没有真正发挥作用。有任何想法吗?这是我的小提琴示例:小提琴 ng-animate。
html
<ul class="results-nav">
<li class="" ng-animate="'animate'" ng-repeat="domain in resultsNav.domain" ng-click="scrollTo(domain.id)">{{domain.title}}</li>
</ul>
css
.animate-enter {
-webkit-transition: 1s linear all; /* Chrome */
transition: 1s linear all;
opacity: 0;
}
.animate-enter.animate-enter-active {
opacity: 1;
}
正如您在我的小提琴中看到的那样,它在运行时没有做任何事情。