Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style borderImageRepeat property

Style borderImageRepeat property

Style Object Reference The Style object

Example

Specify how the image border is repeated:

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

Try it »


Definition and Usage

The borderImageRepeat property sets or returns whether an image border is repeated (tiled) or stretched.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Opera does not support the borderImageRepeat property.

Internet Explorer 10 and earlier versions do not support the borderImageRepeat property.

Safari 5 and earlier versions do not support the borderImageRepeat property.

See borderImage property as an alternative!


Syntax

Return the borderImageRepeat property:

object

.style.borderImageRepeat

Set the borderImageRepeat property:

object

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

Attribute values

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 number of tiles is not an integer, the image is scaled so that the tile count is an integer.
space The image is tiled (repeated) to fill the area. If the number of tiles is not an integer, the extra space is distributed among the tiles.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default value: stretch
Return Value: A string representing the element's border-image-repeat property.
CSS version CSS3

Related Articles

CSS Reference Manual:The border-image-repeat property


Style Object Reference The Style object