Style borderImageRepeat attribute

Definition and usage

borderImageRepeat Sets or returns whether the image border should be tiled (repeated), filled (rounded), or stretched (stretched).

See also:

CSS Reference Manual:border-image-repeat property

Example

Specifies how the image border should be repeated:

document.getElementById("myDIV").style.borderImageRepeat = "round";

Try it yourself

Syntax

Return borderImageRepeat property:

object.style.borderImageRepeat

Set borderImageRepeat property:

object.style.borderImageRepeat = "stretch|repeat|round|initial|inherit"

Attribute value

Value Description
stretch Default value. The image is stretched to fill the area.
repeat The image is tiled (repeated) to fill the area.
round

The image is tiled (repeated) to fill the area.

If the area is not filled with an exact number of tiles, the image is resized to fit.

space

The image is tiled (repeated) to fill the area.

If the area is not filled with an exact number of tiles, the extra space will be distributed around the tiles.

initial Sets this property to its default value. See also initial.
inherit Inherits this property from its parent element. See also inherit.

Technical details

Default value: stretch
Return value: A string that represents the border-image-repeat property.
CSS version: CSS3

Browser support

Talene i tabellen angiver den første browserversion, der fuldt ud understøtter egenskaben.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Understøtter 11.0 Understøtter 6.0 15.0

Se også borderImage egenskab.