CSS Cubic Bezier Curves: Acceleration Curves, Splines & Spring Transitions
Cubic Bezier curves define smooth easing transitions in CSS using four control points: P0(0,0), P1(x1,y1), P2(x2,y2), and P3(1,1). Setting y-coordinates above 1.0 or below 0.0 simulates physical spring and bounce easing.
CSS Properties & Syntax Reference
| CSS Rule / Parameter | Syntax Specification & Compositor Behavior |
|---|---|
| Mathematical Formula | B(t) = (1-t)^3*P0 + 3(1-t)^2*t*P1 + 3(1-t)*t^2*P2 + t^3*P3, where 0 <= t <= 1 |
| Coordinate Boundaries | x1 and x2 MUST be within [0, 1]; y1 and y2 can exceed [0, 1] for bounce |
| Standard Keyword Curves | ease (0.25, 0.1, 0.25, 1), ease-in (0.42, 0, 1, 1), ease-out (0, 0, 0.58, 1) |
| Standard | W3C CSS Easing Functions Level 1 |
Cross-Browser Rendering & Compositor Engine Support
-webkit-) for backdrop filters, clip paths, and text smoothing.
Production CSS Recipes & Snippets
Elastic Spring Bounce Easing
.modal-popup {
/* y2 = 1.4 creates an overshoot bounce effect before settling at 1.0 */
transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
transform: scale(1);
}
.modal-hidden {
transform: scale(0.7);
}
Smooth Material Design Deceleration
.drawer-slide {
transition: transform 0.35s cubic-bezier(0.0, 0.0, 0.2, 1);
}
GPU Compositing & Layout Performance Tuning
Modern browser rendering engines divide graphical updates into Style, Layout, Paint, and Composite stages. High-performance interfaces optimize execution by isolating dynamic animations to compositor-only CSS properties—specifically transform and opacity. Altering geometry properties like width, margin, or top forces full layout reflows and repaints, increasing CPU utilization and causing frame drops on lower-power mobile devices. Leverage hardware layer promotion strategically to preserve 60 FPS visual smoothness, and explicitly reserve component aspect ratios to ensure Cumulative Layout Shift (CLS) scores remain at zero. Profile paint timings under 4x CPU throttling in Chrome DevTools to eliminate paint invalidation bottlenecks.