angular.js - How to do some cleanup after CSS animation ends?
phpcn_u1582
phpcn_u1582 2017-05-15 16:58:47
0
1
555

When studying angularjs animation, the basic method is to add some classes to control animation, such as: ng-enter, ng-enter-active, etc. But I can’t figure out how to remove these after the animation is over?

.animate-repeat{
    box-sizing:border-box;
    height:48px;
    line-height:48px;
    overflow:hidden;
}
.animate-repeat.ng-enter{
    transition:height ease-out .5s;
}
.animate-repeat.ng-enter {
    height:0;
    background:#CADFF0;
}
.animate-repeat.ng-enter.ng-enter-active {
    height:48px;
}

I think the advantage of this is to use ng-enter as an animation switch. When starting the animation, add this class and activate the animation through ng-enter-active. This method is very good, but I haven’t found how Angular removes ng-enter and ng-enter-active after the animation ends?

phpcn_u1582
phpcn_u1582

reply all(1)
仅有的幸福

m.jb51.net/css/72443.html

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template