First Public Working Draft · css-easing

CSS Easing Functions

3 functions, 1 type defined by this specification, all known to at least one browser .

Each feature in detail

cubic-bezier()

Function Baseline: widely availablesince January 2018

MDN The cubic-bezier() CSS function creates a smooth transition using a cubic Bézier curve. As an easing-function, it can be used to smooth out the start and end of the interpolation.

Live preview Example from MDN
div {
  margin: 8px auto;
  padding: 8px;
  width: 256px;
  border-radius: 40px;
  background-color: wheat;
}

span {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: tomato;
}

div:hover span,
div:focus span {
  translate: 192px 0;
}

span {
  transition: translate 0.3s cubic-bezier(0.3, 0.8, 0.3, 2.3);
}

Syntax

cubic-bezier( [ <number [0,1]>, <number> ]#{2} )

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting cubic-bezier()
Chrome 16
Edge 12
Firefox 4
Safari 6
Chrome Android 18
Safari iOS 6

First version with support, from MDN browser-compat-data.

linear()

Function Baseline: widely availablesince June 2026 Modern CSS: linear() easing

MDN The linear() CSS function creates a transition curve that progresses uniformly between points. As an easing-function, it creates transitions where the interpolation occurs at a constant rate from beginning to end.

Syntax

linear( [ <number> && <percentage>{0,2} ]# )

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting linear()
Chrome 113
Edge 113
Firefox 112
Safari 17.2
Chrome Android 113
Safari iOS 17.2

First version with support, from MDN browser-compat-data.

steps()

Function Baseline: widely availablesince March 2023

MDN The steps() CSS function defines a transition that divides the input time into a specified number of intervals that are equal in length. This subclass of step functions are sometimes also called staircase functions.

Syntax

steps( <integer>, <step-position>?)

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting steps()
Chrome 8
Edge 12
Firefox 4
Safari 5.1
Chrome Android 18
Safari iOS 5

First version with support, from MDN browser-compat-data.

<easing-function>

Type Baseline: widely availablesince January 2018

MDN The <easing-function> CSS data type represents a mathematical function that describes the rate at which a value changes.

Live preview Example from MDN
body > div {
  position: relative;
  height: 100px;
}

div > div {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: blue;
  background-image: radial-gradient(
    circle at 10px 10px,
    rgb(25 255 255 / 80%),
    rgb(25 255 255 / 40%)
  );
  border-radius: 50%;
  top: 25px;
  animation: 1.5s infinite alternate;
}

@keyframes move-right {
  from {
    left: 10%;
  }

  to {
    left: 90%;
  }
}

li {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

Syntax

<linear-easing-function> | <cubic-bezier-easing-function> | <step-easing-function>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Browser support

First browser version supporting <easing-function>
Chrome 4
Edge 12
Firefox 4
Safari 3.1
Chrome Android 18
Safari iOS 2

First version with support, from MDN browser-compat-data.