CSS mask-border-width Property

❮ Previous Reference Next ❯


.example {
  /* Standard syntax*/
  mask-border: url("hello-world.png");
  mask-border-width: 10% 40%;
  /* Chromium based browser */
  -webkit-mask-box-image: url("hello-world.png");
  -webkit-mask-box-image-width: 10% 40%;


The mask-border-width CSS property sets the width of an element's mask-border.

Note: Chromium-based browsers support an outdated version of this property — -webkit-mask-box-image-width — with a prefix.

Possible values:

Default value:auto
JavaScript syntax:

Standard Syntax

mask-border-width: auto|number|length|percentage|initial|inherit|revert|revert-layer|unset;

Browser Support


Property Values

The following table describes the values of this property:

Value Description
auto This is the default value. The width of the mask border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding mask-border-slice. If the image does not have the required intrinsic dimension, the corresponding border-width is used instead.
number The width of the mask border, specified as a multiple of the corresponding border-width. Negative number is not allowed.
length The width of the mask border, specified as a length.
percentage The width of the mask border, specified as a percentage. Percentages are relative to the width of the border area for horizontal offsets and the height of the border area for vertical offsets. Negative percentage is not allowed.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.

Default CSS Property Values

selectors {
  mask-border-width: auto;
❮ Previous Reference Next ❯