Chapter 10 transform/transition/animation

transform

transform 不会影响元素在页面的位置,它实际上是重叠在元素的上方下方或者旁边。
换句话说,web浏览器会保留元素没有变化时网页上的所有其他部件

http://westciv.com/tools/transforms/index.html
https://www.smashingmagazine.com/2012/01/adventures-in-the-third-dimension-css-3-d-transforms/
https://webkit.org/blog-files/3d-transforms/morphing-cubes.html
https://developer.apple.com/safaridemos/showcase/gallery
https://2011.beercamp.com/
http://www.satine.org/research/webkit/snowleopard/snowstack.html

transition

  • 两个样式
  • 使用transition属性
  • 触发器 (:hover, :active,:focus) or javascript

cubic-bezier

transition-timing-function: cubic-bezier(.20, .96,.74,.07);

http://matthewlein.com/ceaser
www.the-art-of-web.com/css/timing-function

animation

@keyframes fadeOut {
from {opacity: 1;}
to {opacity: 0;}
}

.fade {
animation-name: fadeOut;
animation-duration:2s;
animation-iteration-count: 2;
animation-direction: alternate;
}

动画结束时保留为动画结束时的样子:

animation-fill-mode: forwards;

暂停动画

animation-play-state: paused;
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    love2013阅读 6,857评论 0 11
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    wzhiq896阅读 5,877评论 0 2
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,919评论 25 709
  • 9月13日晚上和大家一起观看了军训慰问演出。主题是 青春喜迎十九大 不忘初心跟党走 2017新生军训慰问演出。演出...
    颦眉阅读 1,288评论 0 0
  • 长期读圣经能带来的是什么?我想说的是:至少那些坚持读圣经的人,心灵一定是饱满生动的,最终也会走在神给他预备的充满恩...
    高桥先生阅读 5,540评论 0 2

友情链接更多精彩内容