角度版本:1.6.1
我正在尝试为我的ng-view元素进行淡入/淡出。问题是只有输入动画才有效。
html部分:
<main class="main" ng-view></main>
app.js
App.animation('.main', function() {
return {
enter : function(element, done) {
TweenMax.set(element,{autoAlpha:0});
TweenMax.to(element, .4, {autoAlpha: 1, ease: Quad.easeOut, delay: 1});
done();
},
leave : function(element, done) {
TweenMax.to(element, .4, {autoAlpha: 0, ease: Quad.easeOut});
done();
}
};
});
提前致谢,感谢您提供的任何帮助。
答案 0 :(得分:0)
enter : function(element, done) {
TweenMax.to(element, .4, {autoAlpha: 1, ease: Quad.easeOut, delay: 1, onComplete:done});
},
leave : function(element, done) {
TweenMax.to(element, .4, {autoAlpha: 0, ease: Quad.easeOut, onComplete:done});
}
css || .main:opacity:0;