RevealTheme logo

Bộ tạo đường cong gia tốc Cubic Bezier

Tạo các đường cong gia tốc cubic-bezier cho CSS. Bao gồm các giá trị cài sẵn theo chuẩn.

transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);

Cách sử dụng công cụ này

  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. 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. 3

    Read the generated transition-timing-function: cubic-bezier(a, b, c, d); line in the output box.

  4. 4

    Copy that declaration by hand and drop it into your CSS transition or animation rule.

Bộ tạo đường cong Cubic Bezier là gì?

Các hiệu ứng động CSS dùng các hàm gia tốc (easing) để kiểm soát cách các giá trị thay đổi theo thời gian. Bốn tham số của cubic-bezier định nghĩa một đường cong từ (0,0) đến (1,1): đường cong càng dốc thì hiệu ứng động càng nhanh ở vùng đó. Các giá trị cài sẵn thông dụng đáp ứng phần lớn nhu cầu; các đường cong tùy chỉnh tạo ra chuyển động đặc trưng.

Các trường hợp sử dụng phổ biến

  • 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.

Câu hỏi thường gặp

Sự khác biệt giữa ease và ease-in là gì?
ease tăng tốc rồi giảm tốc. ease-in chỉ tăng tốc. ease-out chỉ giảm tốc. ease-in-out thực hiện cả hai một cách rõ rệt hơn.
Khi nào tôi nên dùng đường cong tùy chỉnh?
Khi các hàm gia tốc chuẩn trông quá chung chung. Những đường cong tùy chỉnh tinh tế tạo ra một bản sắc chuyển động riêng cho thương hiệu.

Công cụ liên quan