我有一個div元素與ng-view,這工作得很好。我一直在嘗試使用CSS Transition做一個簡單的幻燈片,看起來我所有的動畫工作都是無用的,並且元素只是在瞬間出現/消失。 嘗試了兩個AngularJS 1.1.4和1.1.5,它沒有幫助。 想法任何人?ng-animate的Ng視圖似乎沒有動畫
下面的代碼:
home.html的
<div ng-view ng-animate="'animate'"></div>
animations.css
.animate-enter, .animate-leave {
-webkit-transition:all 2s ease;
-moz-transition:all 2s ease;
-o-transition:all 2s ease;
transition:all 2s ease;
}
.animate-enter {
left: -100%;
}
.animate-enter.animate-enter-active {
left: 0;
}
.animate-leave {
left: 0;
}
.animate-leave.animate-leave-active {
left: 100%;
}
控制器在哪裏? –