When easing isn’t enough to get the exact animation you want, you can leverage keyframes to define and precise styles and steps over time. Keyframes allow you to achieve pretty much any Angular 2 animation you want.

animations:[
trigger('signal', [
state('void', style({
'transform':'translateY(-100%)'
})),
state('go', style({
'background-color':'green',
'height':'100px'
})),
state('stop', style({
'background-color':'red',
'height':'50px'
})),
transition('void => *', animate(, keyframes([
style({'transform':'scale(0)'}),
style({'transform':'scale(.1)'}),
style({'transform':'scale(.9)'}),
style({'transform':'scale(1)'})
]))),
transition('* => *', animate('2s 1s cubic-bezier(0.175, 0.885, 0.32, 1.275)'))
])
],

[Angular2 Animation] Use Keyframes for Fine-Tuned Angular 2 Animations的更多相关文章

  1. css3中的transform、transition、translate、animation(@keyframes)的区别

    一.前言 在CSS中,我们经常会使用到transform.transition.translate.animation(@keyframes)这些长得相似,又不好区分的属性(值).每当需要使用它们,都 ...

  2. [Angular2 Animation] Control Undefined Angular 2 States with void State

    Each trigger starts with an “undefined” state or a “void” state which doesn’t match any of your curr ...

  3. [Angular2 Animation] Delay and Ease Angular 2 Animations

    By default, transitions will appear linearly over time, but proper animations have a bit more custom ...

  4. CSS3 动画 animation和@keyframes

    CSS3 @keyframes 规则 如需在 CSS3 中创建动画,您需要学习 @keyframes 规则. @keyframes 规则用于创建动画.在 @keyframes 中规定某项 CSS 样式 ...

  5. css animation和keyframes

    keyframes应用在animation上,animation应用在元素上. <html> <style type="text/css"> .div1 { ...

  6. css中animation和@keyframes 动画

    Animation 使用简写属性,将动画与 div 元素绑定: div { animation:mymove 5s infinite; -webkit-animation:mymove 5s infi ...

  7. animation和keyframes

    animation:name duration timing-function delay iteration-count direction; name:名字 duration: 持续时间 timi ...

  8. [Angular2 Router] Configure Auxiliary Routes in the Angular 2 Router - What is the Difference Towards a Primary Route?

    In this tutorial we are going to learn how we can can configure redirects in the angular 2 router co ...

  9. [Angular2 Animation] Basic animation

    @Component({ selector: 'app-courses', templateUrl: './courses.component.html', styleUrls: ['./course ...

随机推荐

  1. Vue 国家省市三级联动

    在网上查阅一下,基本上是省市区三级联动,国家省市的就只能自己动手了. 样式就根据自己的需要去调整了. JSON数组太长,就折叠放在了后面. 效果图: <!DOCTYPE html> < ...

  2. linux系统常用日志

    系统日志记录着系统运行中的记录信息,在服务或者系统发生故障的时候,通过查询系统日志,可以帮助我们诊断.系统日志可以预警安全问题,系统日志一般都存放在/var/log目录下 /var/log/dmesg ...

  3. python hmac 加密

    python2 :  key 是秘钥 类型为 str msg 要加密的文件 str digestmod 要加密的方式 python3: key 是秘钥 类型为 byte msg 要加密的文件 byte ...

  4. actionBar-进入界面闪烁问题解决

    问题分析: 主要是因为在开启一个应用的时候,当前界面并不是第一界面,在它之前,还有一个界面启动了,这个界面的唯一目的就是启动主界面,它目的不是显示.虽然如此,但是呢,这个界面的theme因为没有做统一 ...

  5. Objective-C基础笔记(9)Foundation常用类NSArray

    NSArray用来存储对象的有序列表,它是不可变的 NSArray不能存储C语言中的基本数据类型,如int.float.enum.struct,也不能存储nil,nil代表数组元素的结束 // // ...

  6. 轻松学习Linux之Shell预定义变量

    本文出自 "李晨光原创技术博客" 博客,谢绝转载!

  7. USACO 2009 Dec cow toll paths 过路费-floyd

    这道题首先要明确一点,那就是当你从一个点走到自己时,也是需要花费这个点点权值的费用.这个点卡了我两次QWQ 然后我比较喜欢分两步搞: 首先,我们利用floyd的一个性质:就是在更新其他点之间的路线时要 ...

  8. Android JNI用于驱动測试

    硬件平台:S3C6410 操作系统:Ubuntu.windows 板子系统:Android 开发工具:jdk.ndk,eclipse 本次測试从linux内核模块编译開始.以S3C6410的pwm驱动 ...

  9. Apache中PHP5.3 php5.4如何使用ZEND

    Apache中PHP5.3 php5.4如何使用ZEND 有一套zend加密程序,需要安装ZEND,经过多次尝试,结果如下 由于PHP有安全线程(TS)和非安全线程(NTS)区分,PHP官方网站上说, ...

  10. 15.lambda表达式

    #include <iostream> #include <array> using namespace std; //解决函数怀孕现象 //[](){} //[] =引用,只 ...