> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/css/values/unit.md).

# units

[CSS](/web/css.md) ⟩ [values](/web/css/values.md) ⟩ units

{% tabs %}
{% tab title="🔴 主題" %}
\*
{% endtab %}

{% tab title="📘 手冊" %}

* MDN ⟩ CSS ⟩ [length](https://developer.mozilla.org/en-US/docs/Web/CSS/length)
  {% endtab %}
  {% endtabs %}

## key points

* **0** can only be used for **length** values and **percentages**, it **can’t be used** for **angular** values, such as **degrees** or **time-based** values like **seconds**.
* Properties that support **unitless values** include **line-height**, **z-index**, and **font-weight** (**700** is equivalent to **bold**; **400** is equivalent to **normal**, and so on).

## units

* absolute
* relative
* percentage
