Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

turn — angle unit

The `turn` unit expresses an angle as a number of complete revolutions. `1turn` equals `360deg`, and `0.25turn` is a right angle. Use it wherever the CSS syntax accepts an `<angle>`.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

<number>turn

turn is a unit of the <angle> type, not a CSS property. One complete revolution is 1turn = 360deg = 400grad = 2π rad; half a revolution is 0.5turn. Write the number and unit without a space, for example 0.25turn or -0.5turn.

Angle units are compatible and convertible; their canonical unit is deg. Do not assume that unitless 0 is a valid angle in every syntax: 0turn is the safe explicit form.

In the example, rotate(0.25turn) rotates a horizontal rectangle clockwise by a quarter revolution. The result is vertical, just as with rotate(90deg). Setting transform alone does not start an animation.

Examples

<!doctype html>
<meta charset="utf-8">
<title>turn</title>
<style>
  .bar {
    width: 120px;
    height: 20px;
    margin: 80px;
    background: navy;
    transform: rotate(0.25turn);
  }
</style>
<div class="bar"></div>

Result

A vertical navy rectangle, 20 CSS pixels wide and 120 CSS pixels tall.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources