--- id: css-transition-timing title: "CSS Transition Timing" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["transition-timing-function", "transition-delay", "speed curve", "ease", "cubic-bezier", "transition shorthand"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.89 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "transition", "timing-function", "animation"] raw_sources: ["https://www.w3schools.com/css/css3_transitions_timing.asp"] applied_in: [] github_commit: "" --- # [[CSS Transition Timing]] ## π― ν μ€ ν΅μ°° (One-line insight) The `transition-timing-function` property sets the speed curve of a transition, `transition-delay` postpones its start, and the `transition` shorthand combines property, duration, timing-function, and delay into one declaration. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **`transition-timing-function`** β specifies the speed curve of the transition effect. [S1] - **`transition-delay`** β introduces a waiting period (in seconds or milliseconds) before the transition begins. [S1] - **Transition + transform** β the `transform` property can be transitioned alongside other properties for combined effects. [S1] - **Two ways to declare** β set the four individual `transition-*` properties separately, or collapse them into the `transition` shorthand. [S1] ## π§© μΆμΆλ ν¨ν΄ (Extracted patterns) - **Speed-curve selection** β choose among `ease`, `linear`, `ease-in`, `ease-out`, `ease-in-out`, or a custom `cubic-bezier(n,n,n,n)`. [S1] - **Delayed start** β `transition-delay: 1s;` waits before the visible change begins. [S1] - **Shorthand ordering** β `transition: width 2s linear 1s;` corresponds to property, duration, timing-function, delay. [S1] ## π μΈλΆ λ΄μ© (Details) **The Speed Curve of the Transition** The `transition-timing-function` property specifies the speed curve of the transition effect. The `transition-timing-function` property can have the following values: [S1] - `ease` β specifies a transition effect with a slow start, then fast, then end slowly (this is default). [S1] - `linear` β specifies a transition effect with the same speed from start to end. [S1] - `ease-in` β specifies a transition effect with a slow start. [S1] - `ease-out` β specifies a transition effect with a slow end. [S1] - `ease-in-out` β specifies a transition effect with a slow start and end. [S1] - `cubic-bezier(n,n,n,n)` β lets you define your own values in a cubic-bezier function. [S1] The following example shows the different speed curves applied to several elements: [S1] ```css #div1 {transition-timing-function: linear;} #div2 {transition-timing-function: ease;} #div3 {transition-timing-function: ease-in;} #div4 {transition-timing-function: ease-out;} #div5 {transition-timing-function: ease-in-out;} ``` **Delay the Transition Effect** The `transition-delay` property specifies a delay (in seconds) for the transition effect. The following example has a 1 second delay before starting: [S1] ```css div { transition-delay: 1s; } ``` **Transition + Transformation** The following example adds a transition effect to the transformation: [S1] ```css div { transition: width 2s, height 2s, background-color 2s, transform 2s; } ``` A further example transitions both background-color and transform on a button: [S1] ```css button { transition: background-color 1s ease-out, transform 1s ease-out; } ``` **More Transition Examples** The CSS transition properties can be specified one by one, like this: [S1] ```css div { transition-property: width; transition-duration: 2s; transition-timing-function: linear; transition-delay: 1s; } ``` Or by using the shorthand property `transition`: [S1] ```css div { transition: width 2s linear 1s; } ``` **CSS Transition Properties** The following table lists the CSS transition properties: [S1] | Property | Description | |----------|-------------| | `transition` | A shorthand property for setting the four transition properties into a single property | | `transition-delay` | Specifies a delay (in seconds) for the transition effect | | `transition-duration` | Specifies how many seconds or milliseconds a transition effect takes to complete | | `transition-property` | Specifies the name of the CSS property the transition effect is for | | `transition-timing-function` | Specifies the speed curve of the transition effect | ## π οΈ μ μ© μ¬λ‘ (Applied in summary) The page applies different timing functions to `#div1`β`#div5`, a 1-second delay to a `