Menu Home

mask

osbo.com | SVG | Elements | mask

The mask SVG element specifies an alpha mask for compositing the current object into the background.

Use white to include in the mask and black to exclude from the mask.

Syntax

Attributes

height

Specifies the height of the largest possible offscreen buffer.

Value
<length-percentage>
Default
120%

maskConentUnits

Specifies the coordinate system for the contents of the mask.

Value
objectBoundingBox | userSpaceOnUse
Default
userSpaceOnUse

maskUnits

Specifies the coordinate system for attributes x, y, width, and height.

Value
objectBoundingBox | userSpaceOnUse
Default
objectBoundingBox

width

Specifies the width of the largest possible offscreen buffer.

Value
<length-percentage>
Default
120%

x

Specifies the x-axis coordinate of one corner of the rectangle for the largest possible offscreen buffer.

Value
<length-percentage>
Default
-10%

y

Specifies the y-axis coordinate of one corner of the rectangle for the largest possible offscreen buffer.

Value
<length-percentage>
Default
-10%

Examples

height

<length-percentage>

maskConentUnits

objectBoundingBox

userSpaceOnUse

maskUnits

objectBoundingBox

userSpaceOnUse

width

<length-percentage>

x

<length-percentage>

y

<length-percentage>

Internal

clipPath

External

World Wide Web Consortium (W3C)