博客
关于我
Angular开发(二十五)-angular自带动画效果
阅读量:123 次
发布时间:2019-02-26

本文共 732 字,大约阅读时间需要 2 分钟。

angular2????????

????????????

import {Component, OnInit, style, trigger, state, transition, animate, keyframes} from '@angular/core';

@Component({selector: 'app-page1',templateUrl: './page1.component.html',styleUrls: ['./page1.component.css'],animations: [trigger('loginAnimation', [state('normal', style({transform: 'scale(1)'})),state('active', style({transform: 'scale(1.5)'})),transition('normal => active', animate('100ms ease-in')),transition('active => normal', animate('100ms ease-out'))])]})export class Page1Component implements OnInit {private loginBtnState: string = 'inactive';

constructor() {}ngOnInit() {}toggleLoginState(state: boolean) {  this.loginBtnState = state ? 'active' : 'inactive';}

}

???HTML???????

??????

转载地址:http://svvf.baihongyu.com/

你可能感兴趣的文章
Objective-C实现循环队列链表算法(附完整源码)
查看>>
Objective-C实现快速排序算法(附完整源码)
查看>>
Objective-C实现恩尼格玛密码机算法(附完整源码)
查看>>
Objective-C实现感知哈希算法(附完整源码)
查看>>
Objective-C实现感知哈希算法(附完整源码)
查看>>
Objective-C实现截留雨水问题的动态编程方法算法(附完整源码)
查看>>
Objective-C实现截留雨水问题的蛮力方法的算法(附完整源码)
查看>>
Objective-C实现打印10000以内的完数(附完整源码)
查看>>
Objective-C实现打印1000以内的水仙花数(附完整源码)
查看>>
Objective-C实现打印九九乘法表(附完整源码)
查看>>
Objective-C实现打印从 0 到 n 的卡特兰数算法(附完整源码)
查看>>
Objective-C实现打印函数调用堆栈( 附完整源码)
查看>>
Objective-C实现打印杨辉三角(附完整源码)
查看>>
Objective-C实现打印某年的历法日期(附完整源码)
查看>>
Objective-C实现打印魔方矩阵(附完整源码)
查看>>
Objective-C实现打格点算法(附完整源码)
查看>>
Objective-C实现批量修改文件类型算法(附完整源码)
查看>>
Objective-C实现找出一个数的质因数primeFactors算法(附完整源码)
查看>>
Objective-C实现找出买卖股票的最大利润算法(附完整源码)
查看>>
Objective-C实现找出二维数组中的鞍点(附完整源码)
查看>>