css數據類型是一種特殊的類型,它表示一個整數,無論是正數還是負數。整數可以用于許多css屬性,例如column-count,counter-increment,grid-column,grid-row,z-index
插值動畫
設置動畫時,數據類型的值將使用離散的完整步驟進行插值。計算過程就像是實數,浮點數一樣;離散值是使用floor函數得到的。插值的速度由與動畫相關聯的定時函數確定。
語法
數據類型由一個或多個十進制數字組成,包括0到9,可以選擇前面加一個+或-號。沒有與整數關聯的單位
實例
合法整型

12 Positive integer (without a leading + sign)+123 Positive integer (with a leading + sign)-456 Negative integer0 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.