transition-timing-function属性指定切换效果的速度。
transition-timing-function: linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n);
css3动画animation-timing-function中的cubic-bezier(n,n,n,n)

cubic-bezier即为贝兹曲线中的绘制方法。图上有四点,P0-3,其中P0、P3是默认的点,对应了[0,0], [1,1]。而剩下的P1、P2两点则是我们通过cubic-bezier()自定义的。cubic-bezier(x1, y1, x2, y2) 为自定义,x1,x2,y1,y2的值范围在[0, 1]。

预留的几个特效:

1 ease: cubic-bezier(0.25, 0.1, 0.25, 1.0)
2 linear: cubic-bezier(0.0, 0.0, 1.0, 1.0)
3 ease-in: cubic-bezier(0.42, 0, 1.0, 1.0)
4 ease-out: cubic-bezier(0, 0, 0.58, 1.0)
5 ease-in-out: cubic-bezier(0.42, 0, 0.58, 1.0)

 

 

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
  • 2021-11-22
  • 2021-06-28
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案