<frequency>
语法
<frequency>
数据类型由一个 <number>
后跟一个下面列出的单位组成。与所有 CSS 维度一样,单位字面量和数字之间没有空格。
Units
示例
有效的频率值
12Hz Positive integer 4.3Hz Non-integer 14KhZ The unit is case-insensitive, though non-SI capitalization is not recommended. +0Hz Zero, with a leading + and a unit -0kHz Zero, with a leading - and a unit
无效的频率值
12.0 This is a <number>, not an <frequency>, because it is missing a unit. 7 Hz No space is allowed between the number and the unit. 0 Although unitless zero is an allowable <length>, it's an invalid <frequency>.
规范
Specification |
---|
CSS Values and Units Module Level 4 # frequency |
浏览器兼容性
BCD 表格仅在浏览器中加载