草庐IT

menuActive

全部标签

html - Angular 2 - 动画过渡不起作用

我需要在两种颜色之间进行转换OnClick。现在,这是我的代码:typescriptanimations:[trigger('menubarState',[state('false',style({backgroundColor:'#43a047'})),state('true',style({backgroundColor:'#333'})),transition('false=>true',animate('1s')),transition('true=>false',animate('1s'))])]...exportclassMenubarComponent{menuActiv

html - Angular 2 - 动画过渡不起作用

我需要在两种颜色之间进行转换OnClick。现在,这是我的代码:typescriptanimations:[trigger('menubarState',[state('false',style({backgroundColor:'#43a047'})),state('true',style({backgroundColor:'#333'})),transition('false=>true',animate('1s')),transition('true=>false',animate('1s'))])]...exportclassMenubarComponent{menuActiv