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, and this page is available as Markdown at /next/zh/api/css/data-type/number.md.
Lynx
  • 简体中文
  • <number>

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

    实例

    有效数字

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

    非法数字

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

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。