CSS Portal

CSS transition-timing-function Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The transition-timing-function controls the pacing of a CSS transition by mapping the elapsed portion of the transition's duration to the progression of the animated property. In other words, it determines whether a change happens at a steady rate, accelerates, decelerates, or follows a more complex curve over the same total time. It is strictly about how progress is distributed across the duration; it does not change the length of the transition or which properties are affected.

Because it shapes perceived motion, this property is a key tool for creating natural, responsive interactions. Used together with transition-duration and transition-delay, it lets you fine-tune timing so that elements feel snappy or smooth without altering when the transition starts or how long it runs. It can be applied differently for separate properties (for example, one timing curve for opacity and another for transform) and is often combined via the transition shorthand when defining multiple transition aspects at once.

On a practical level, the visual effect produced by this property depends on both the element and the type of property being transitioned: transforms and opacity tend to feel smoother at certain pacing than layout-driven properties like width or height. For longer or multi-step interactions, coordinating the pacing specified here with the timing used in animations (see animation-timing-function) helps maintain consistent motion language across a UI. Also keep in mind that complex or extreme pacing can draw attention to transitions or make them feel unnatural, so subtlety is often preferable.

When troubleshooting or refining transitions, think of transition-timing-function as the designer’s control over motion personality rather than a mechanism for changing when things happen. If a transition looks sluggish or too abrupt, adjust the pacing relative to the duration and delay rather than trying to compensate by changing unrelated properties. Testing transitions in context — alongside user interactions and other animated elements — will reveal how a timing choice affects overall perceived responsiveness.

Definition

Initial value
ease
Applies to
All elements, :before and :after pseudo elements
Inherited
No
Computed value
Same as specified value
Animatable
No
JavaScript syntax
object.style.transitionTimingFunction

Interactive Demo

Hover over me
to see transition.

Syntax

transition-timing-function: <single-transition-timing-function> [ ',' <single-transition-timing-function> ]*

Values

<single-transition-timing-function> = ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(<integer>[, [ start | end ] ]?) | cubic-bezier(<number>, <number>, <number>, <number>)
  • easeThe ease function is equivalent to cubic-bezier(0.25, 0.1, 0.25, 1).
  • linearThe linear function is equivalent to cubic-bezier(0, 0, 1, 1).
  • ease-inThe ease-in function is equivalent to cubic-bezier(0.42, 0, 1, 1).
  • ease-outThe ease-out function is equivalent to cubic-bezier(0, 0, 0.58, 1).
  • ease-in-outThe ease-in-out function is equivalent to cubic-bezier(0.42, 0, 0.58, 1)
  • step-startThe step-start function is equivalent to steps(1, start).
  • step-endThe step-end function is equivalent to steps(1, end).
  • steps(<integer>[, [ start | end ] ]?) Specifies a stepping function, described above, taking two parameters. The first parameter specifies the number of intervals in the function. It must be a positive integer (greater than 0). The second parameter, which is optional, is either the value 'start' or 'end', and specifies the point at which the change of values occur within the interval. If the second parameter is omitted, it is given the value 'end'.
  • cubic-bezier(<number>, <number>, <number>, <number>)Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). Both x values must be in the range [0, 1] or the definition is invalid. The y values can exceed this range.

Example

<div class="container">
<h1>transition-timing-function demo</h1>
<div class="row">
<div class="card">
<div class="box ease"></div>
<div class="label">ease</div>
</div>
<div class="card">
<div class="box linear"></div>
<div class="label">linear</div>
</div>
<div class="card">
<div class="box ease-in"></div>
<div class="label">ease-in</div>
</div>
<div class="card">
<div class="box cubic"></div>
<div class="label">cubic-bezier(.68,-0.55,.27,1.55)</div>
</div>
</div>
<p class="hint">Hover any card to see the timing function</p>
</div>
* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: #f6f8fa;
    color: #111827;
}

.container {
    width: 820px;
    max-width: 94%;
    padding: 24px;
}

h1 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.row {
    display: flex;
    gap: 16px;
}

.card {
    background: #ffffff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(11, 22, 45, 0.06);
    width: 180px;
    cursor: pointer;
}

.box {
    height: 40px;
    width: 40px;
    background: #4f46e5;
    border-radius: 6px;
    transform: translateX(0);
}

/* Different timing functions for each example */
.box.ease {
    transition: transform 600ms ease;
}

.box.linear {
    transition: transform 600ms linear;
}

.box.ease-in {
    transition: transform 600ms ease-in;
}

.box.cubic {
    transition: transform 800ms cubic-bezier(.68, -0.55, .27, 1.55);
}

.card:hover .box {
    transform: translateX(120px);
}

.label {
    margin-top: 12px;
    font-size: 14px;
    color: #374151;
}

.hint {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

Browser Support

The following information will show you the current browser support for the CSS transition-timing-function property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!