摘要:和和支持属性。注释以及更早版本的浏览器不支持属性。定义和用法属性规定过渡效果的速度曲线。在函数中定义自己的值。可能的值是至之间的数值。与上例相同,但通过来规定速度曲线
transition-timing-function: linear; -moz-transition-timing-function: linear; /* Firefox 4 */ -webkit-transition-timing-function: linear; /* Safari 和 Chrome */ -o-transition-timing-function: linear; /* Opera */ }Internet Explorer 10、Firefox、Opera 和 Chrome 支持 transition-timing-function 属性。
Safari 支持替代的 -webkit-transition-timing-function 属性。
注释:Internet Explorer 9 以及更早版本的浏览器不支持 transition-timing-function 属性。
定义和用法:transition-timing-function 属性规定过渡效果的速度曲线。该属性允许过渡效果随着时间来改变其速度。
transition-timing-function: linear|ease|ease-in|ease-out|ease-in-out|cubic- bezier(n,n,n,n);
#div1 {transition-timing-function: linear;} #div2 {transition-timing-function: ease;} #div3 {transition-timing-function: ease-in;} #div4 {transition-timing-function: ease-out;} #div5 {transition-timing-function: ease-in-out;} /* Firefox 4: */ #div1 {-moz-transition-timing-function: linear;} #div2 {-moz-transition-timing-function: ease;} #div3 {-moz-transition-timing-function: ease-in;} #div4 {-moz-transition-timing-function: ease-out;} #div5 {-moz-transition-timing-function: ease-in-out;} /* Safari and Chrome: */ #div1 {-webkit-transition-timing-function: linear;} #div2 {-webkit-transition-timing-function: ease;} #div3 {-webkit-transition-timing-function: ease-in;} #div4 {-webkit-transition-timing-function: ease-out;} #div5 {-webkit-transition-timing-function: ease-in-out;} /* Opera: */ #div1 {-o-transition-timing-function: linear;} #div2 {-o-transition-timing-function: ease;} #div3 {-o-transition-timing-function: ease-in;} #div4 {-o-transition-timing-function: ease-out;} #div5 {-o-transition-timing-function: ease-in-out;}
与上例相同,但通过 cubic-bezier 来规定速度曲线:
#div1 {transition-timing-function: cubic-bezier(0,0,1,1;} #div2 {transition-timing-function: cubic-bezier(0.25,0.1,0.25,1);} #div3 {transition-timing-function: cubic-bezier(0.42,0,1,1);} #div4 {transition-timing-function: cubic-bezier(0,0,0.58,1);} #div5 {transition-timing-function: cubic-bezier(0.42,0,0.58,1);} /* Firefox 4: */ #div1 {-moz-transition-timing-function: cubic-bezier(0,0,0.25,1);} #div2 {-moz-transition-timing-function: cubic-bezier(0.25,0.1,0.25,1);} #div3 {-moz-transition-timing-function: cubic-bezier(0.42,0,1,1);} #div4 {-moz-transition-timing-function: cubic-bezier(0,0,0.58,1);} #div5 {-moz-transition-timing-function: cubic-bezier(0.42,0,0.58,1);} /* Safari and Chrome: */ #div1 {-webkit-transition-timing-function: cubic-bezier(0,0,1,1;} #div2 {-webkit-transition-timing-function: cubic-bezier(0.25,0.1,0.25,1);} #div3 {-webkit-transition-timing-function: cubic-bezier(0.42,0,1,1);} #div4 {-webkit-transition-timing-function: cubic-bezier(0,0,0.58,1);} #div5 {-webkit-transition-timing-function: cubic-bezier(0.42,0,0.58,1);} /* Opera: */ #div1 {-o-transition-timing-function: cubic-bezier(0,0,1,1;} #div2 {-o-transition-timing-function: cubic-bezier(0.25,0.1,0.25,1);} #div3 {-o-transition-timing-function: cubic-bezier(0.42,0,1,1);} #div4 {-o-transition-timing-function: cubic-bezier(0,0,0.58,1);} #div5 {-o-transition-timing-function: cubic-bezier(0.42,0,0.58,1);}
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/799.html
摘要:支持替代的属性。注释以及更早版本的浏览器不支持属性。定义和用法属性规定过渡效果的速度曲线。默认值继承性版本语法语法值描述规定以相同速度开始至结束的过渡效果等于。可能的值是至之间的数值。以相同的速度从开始到结束的过渡效果: div { transition-timing-function: linear; -moz-transition-timing-function: linear; /*...
摘要:表示任何属性都不应用过渡,并且可以终止正在执行的过渡。提供两种计算曲线阶梯函数三次贝兹曲线。在插入元素如或改变属性后立即使用过渡元素将视为没有开始状态,始终处于结束状态。过渡取消不会触发该事件。 一、概述 CSS属性的值从一个值变成另一个值的过程叫做渐变,重点突出变化的过程。CSS3 transition系列属性可控制这个变化过程,使得属性值变化过程更加平滑。一个过渡应包含这几个属性:...
摘要:一条正在绘制中的三次方贝塞尔曲线因为该曲线由四个点形成,我们将其称为三次方贝塞尔曲线,而不是二次方曲线三个点或四次方曲线五个点。现在终于可以将贝塞尔曲线收入囊中了,也已经对这 作者:Nicolas(沪江前端开发工程师)本文原创翻译,转载请注明作者及出处。 各位,赶紧绑住自己并紧紧抓牢了,因为当你掌握了特别有趣但又复杂的CSS时序函数之后,你将会真正体验到竖起头发般的兴奋感受。 好吧,本...
阅读 2663·2021-11-11 16:54
阅读 3656·2021-08-16 10:46
阅读 3439·2019-08-30 14:18
阅读 3032·2019-08-30 14:01
阅读 2721·2019-08-29 14:15
阅读 2005·2019-08-29 11:31
阅读 3081·2019-08-29 11:05
阅读 2581·2019-08-26 11:54