> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# `<number>`

APISummary
`<number>` 数据类型代表一个数字，可为整数或小数，它没有任何单位，并不是一个 `CSS` 尺寸。

## 实例

### 有效数字

```css
12          正整数
4.01        正小数
-456.8      负小数
0.0         零
+0.0        带正号的零
-0.0        带符号的零
.60         点前的数字可以省略
10e3        科学计数法
-3.4e-2     科学计数法最复杂的情况
```

### 非法数字

```css
12.         点后需有数字
+-12.2      只能有一个符号
12.1.1      只能有一个点
```

## 兼容性

**Compatibility Table**

**Query:** `css.data-type.number`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/css/data-type/number.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| number | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.5) | Yes (1.5) | Yes |

**`number`**

<code>&lt;number&gt;</code>

**Specifications:**
- [https://drafts.csswg.org/css-values/#number](https://drafts.csswg.org/css-values/#number)

