<integer>

<integer> css数据类型是一种特殊的 <number> 类型,它表示一个整数,无论是正数还是负数。整数可以用于许多css属性,例如 column-count , counter-increment , grid-column , grid-row , z-index

插值动画

设置动画时, 数据类型的值将使用离散的完整步骤进行插值。计算过程就像是实数,浮点数一样;离散值是使用floor函数得到的。插值的速度由与动画相关联的定时函数确定。

语法

<integer> 数据类型由一个或多个十进制数字组成,包括0到9,可以选择前面加一个+或-号。没有与整数关联的单位

实例

合法整型

12          Positive integer (without a leading + sign)
+123        Positive integer (with a leading + sign)
-456        Negative integer
0           Zero
+0          Zero, with a leading +
-0          Zero, with a leading -

非法整型:

12.0        This is a , not an , though it represents an integer.
12.         Decimal points are not allowed.
+---12      Only one leading +/- is allowed.
ten         Letters are not allowed.
_5          Special characters are not allowed.
\35         Escaped Unicode characters are not allowed, even if they are an integer (here: 5).
\4E94       Non-arabic numerals are not allowed, even when escaped (here: the Japanese 5, 五).
3e4         Scientific notation is not allowed.

上篇: <number>

下篇: <percentage>