CSS mask-border-repeat Property

❮ Previous Reference Next ❯

Example

.example {
  /* Standard syntax*/
  mask-border: url("hello-world.png");
  mask-border-repeat: round;

  /* Chromium based browser */
  -webkit-mask-box-image: url("hello-world.png");
  -webkit-mask-box-image-repeat: round;
}

Meaning:

The mask-border-repeat CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask-border.

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

Default value:stretch
Inherited:No
Animatable:No
Version:CSS3
JavaScript syntax:
object.style.maskBorderRepeat="stretch|repeat|round|space|initial|inherit|revert|revert-layer|unset";



Standard Syntax

mask-border-repeat: stretch|repeat|round|space|initial|inherit|revert|revert-layer|unset;



Browser Support




Status







Property Values

The following table describes the values of this property:

Value Description
stretch The source image's edge regions are stretched to fill the gap between each border.
repeat The source image's edge regions are tiled (repeated) to fill the gap between each border. Tiles may be clipped to achieve the proper fit.
round The source image's edge regions are tiled (repeated) to fill the gap between each border. Tiles may be stretched to achieve the proper fit.
space The source image's edge regions are tiled (repeated) to fill the gap between each border. Extra space will be distributed in between tiles to achieve the proper fit.
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-repeat: stretch;
}
❮ Previous Reference Next ❯