我已经使用了这个例子 http://www.yearofmoo.com/2013/08/remastered-animation-in-angularjs-1-2.html
我能够让动画发挥作用。但我想只留下假动画。有办法吗?我试图摆脱我的CSS .repeat-item.ng-enter
,不幸的是没有用。任何见解?
谢谢!
我的Javascript:
<tr ng-repeat="item in m.itemList" class="repeat-item">
我的CSS:
.repeat-item.ng-enter,
.repeat-item.ng-leave {
-webkit-transition:1s linear all;
transition:1s linear all;
}
.repeat-item.ng-enter,
.repeat-item.ng-leave.ng-leave-active {
opacity:0;
}
.repeat-item.ng-leave,
.repeat-item.ng-enter.ng-enter-active {
opacity:1;
}
我更新的CSS:
.repeat-item.ng-leave {
-webkit-transition:1s linear all;
transition:1s linear all;
}
.repeat-item.ng-leave.ng-leave-active {
opacity:0;
}
.repeat-item.ng-leave{
opacity:1;
}
在我更新的CSS中,我摆脱了与ng-enter
相关的任何内容,但仍然有动画进入。
答案 0 :(得分:2)
对我来说这很有效!
这是一个有效的example
.repeat-item.ng-leave {
-webkit-transition:1s linear all;
transition:1s linear all;
}
.repeat-item.ng-leave.ng-leave-active {
opacity:0;
}
.repeat-item.ng-leave{
opacity:1;
}