--- title: primitiveUnits slug: Web/SVG/Attribute/primitiveUnits translation_of: Web/SVG/Attribute/primitiveUnits ---

« SVG Attribute reference home

primitiveUnits属性为过滤器原语和定义过滤器原语子域中的各种各样的长度单位指定坐标系统.

如果primitiveUnits属性未指定,那么效果就如同指定值为userSpaceOnUse的效果是一样的.

Usage context

Categories None
Value userSpaceOnUse | objectBoundingBox
Animatable Yes
Normative document SVG 1.1 (2nd Edition)
userSpaceOnUse
当{{ SVGElement("filter") }}元素使用该值的时候,过滤器中定义的任意长度的值都基于当前用户坐标系统(例如通过{{ SVGAttr("filter") }}属性引用该{{ SVGElement("filter") }}元素的元素所在的用户坐标系统).
objectBoundingBox
在filter中定义的任意长度值表示引用该filter的元素的包围盒的分数或百分比.

Examples

Elements

下列元素可以使用primitiveUnits属性: