2016-11-15 109 views
0

我想将动画应用于md卡(尝试复制https://teradata.github.io/covalent/#/components/expansion-panel)...我能够获取视图并应用动画,但是卡展开时的转换/折叠是光滑的,我无法得到。我已经在这里演示http://plnkr.co/edit/kvzSSbseT5cbOv054i2u?p=preview,其中状态之间的转换是fast.I想实现同一种动画的点击我在演示卡时,...为angular2动画效果应用动画效果

animations: [ 
    trigger('animationState', [ 
     state('active', style({ height: '*' })), 
     state('inactive', style({ height: '0px', display: 'none' })), 
     transition('inactive => active', animate('150ms ease-out')), 
     transition('active => inactive', animate('150ms ease-out')) 
    ]) 
] 

这些都是我是动画试图申请。 有人可以帮助我获得上述链接中的动画效果吗?

回答