Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

rad — angle unit in radians

The `rad` unit expresses CSS angles in radians. A full turn is 2π radians; values using this unit belong to the `<angle>` type.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, exact-source verification for the usage example passed

Syntax

<number>rad

rad is a unit of the <angle> type, not a CSS property. Write a number immediately before the unit, such as 1rad or -0.5rad; do not insert whitespace.

A full rotation is 2π radians, equivalent to 360deg or 1turn. A right angle is π/2 radians, approximately 1.5707963267948966rad. A finite decimal representation is an approximation, not the exact value of π/2.

Use rad wherever the syntax accepts <angle>, such as in rotate(). The unit specifies the angle's magnitude; the surrounding context determines its interpretation. Do not assume that bare 0 is a valid angle everywhere: 0rad explicitly supplies the unit.

In the example, rotate() turns the arrow approximately one quarter-turn clockwise. The character → remains in the document, but visually points down.

Examples

<!doctype html>
<meta charset="utf-8">
<title>rad</title>
<style>
  .arrow {
    width: 80px;
    margin: 80px;
    font: 48px/1 sans-serif;
    text-align: center;
    transform: rotate(1.5707963267948966rad);
  }
</style>
<div class="arrow">→</div>

Result

↓

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