0
我在角度上使用twitter引導模態窗口,並希望在模態窗口出現時以及關閉時動畫。我嘗試了nganimate,但它似乎沒有工作。Animating Bootstrap打開和關閉動畫 - 角
CSS
.slide-enter-setup, .slide-leave-setup {
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
}
.slide-enter-setup {
position:absolute;
left:0;
top:-200px;
}
.slide-enter-start {
top:0;
}
.slide-leave-setup {
position:absolute;
top:0;
}
.slide-leave-start {
top:200px;
}
JS
angular.module("template/modal/window.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("template/modal/window.html",
"<div ng-animate=\"slide\" class=\"modal{{ windowClass }}\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10}\" ng-transclude></div>");
}]);
Plnkr - http://plnkr.co/edit/D1tMRpxVzn51g18Adnp8?p=preview