Cubic Bezier缓动曲线生成器
为CSS创建cubic-bezier缓动曲线。内置标准预设。
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
如何使用本工具
- 1
Click a preset (ease, ease-in, ease-out, or ease-in-out) to load its four control values, or skip this to start from the default ease curve.
- 2
Drag the a, b, c, and d sliders to adjust the two control points; each ranges from -1 to 2 in steps of 0.05 and the current value shows above the slider.
- 3
Read the generated transition-timing-function: cubic-bezier(a, b, c, d); line in the output box.
- 4
Copy that declaration by hand and drop it into your CSS transition or animation rule.
什么是Cubic Bezier曲线生成器?
CSS动画使用缓动(easing)函数来控制数值随时间变化的方式。cubic-bezier的四个参数定义了一条从(0,0)到(1,1)的曲线:曲线在某一区域越陡,动画在该区域就越快。常见的预设可以满足大多数需求;自定义曲线则能创造出与众不同的动效。
常见使用场景
Tuning a button hover or focus transition so it feels snappy on entry and gentle on exit instead of using the generic default ease.
Designing a card or modal that overshoots slightly on open by pushing the d (P2 y) value above 1 for a subtle bounce.
Matching a brand motion spec where designers handed you specific cubic-bezier control points to reproduce in CSS.
Replacing a linear or default easing on a loading spinner or progress bar with a custom acceleration profile.
Quickly grabbing the canonical values behind ease-in-out without memorizing 0.42, 0, 0.58, 1.
Prototyping menu slide-in and drawer animations by comparing how ease-in versus ease-out change the perceived weight of the motion.
常见问题
ease和ease-in有什么区别?▼
我什么时候该使用自定义曲线?▼
相关工具
颜色转换工具(HEX/RGB/HSL)
在HEX、RGB和HSL格式之间转换颜色。可视化选取颜色,或手动输入数值。
CSS Box Shadow生成器
以可视化方式创建CSS box-shadow值。实时预览并复制生成的CSS。
CSS渐变生成器
创建线性和径向CSS渐变。以可视化方式选择颜色,并复制生成的CSS。
配色方案生成器
从任意基准色生成和谐的配色方案。支持互补色、邻近色、三角色和单色方案。
CSS Border Radius生成器
以可视化方式创建复杂的CSS border-radius值。可独立控制每个圆角。
CSS Clamp()生成器
使用clamp()生成流式、响应式的CSS数值。在视口范围内于最小值与最大值之间平滑缩放。