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

CSS3 border-image-repeat property

CSS3 border-image-repeat property

Example

Set the way the image is repeated:

div

{

   

border-image-source:

url(border.png);

   

border-image-repeat:

repeat;

}

Try it »


Definition and usage

The border-image-repeat property specifies whether the border image should be repeated, stretched, or rounded.

**Tip:*You can view the border-image property (shorthand property used to set all border-image- properties). 

Default value: stretch
Inheritance: no
Animatable: no. Check animatable
Version: CSS3
JavaScript syntax: object.style.borderImageRepeat="round" Try it

Browser support

The numbers in the table indicate the version number of the first browser to support the event.

property
border-image-repeat 15.0 11.0 15.0 6.0 15.0

CSS Syntax

border-image-repeat: stretch|repeat|round|initial|inherit;

Note: This property specifies how the edge and middle parts of the border image are stretched and tiled. Therefore, you can specify two values. If the second value is omitted, the same value as the first is taken.

Attribute values

Value Description Example
stretch Default value. Stretch the image to fill the area View example »
repeat Tile (repeated) the image to fill the area. View example »
round Similar to the repeat value. If the image cannot be fully tiled, it is scaled to fit the area. View example »
space Similar to the repeat value. If the image cannot be fully tiled, the extra space is distributed around the image
initial Sets this property to its default value.Check initial View example »
inherit Inherits this property from the parent element. Check inherit

Related pages

CSS3 tutorial: CSS3 Borders

CSS Reference Manual: The border-image property

CSS Reference Manual: The border-image-repeat property

CSS Reference Manual: The border-image-slice property

CSS Reference Manual: The border-image-source property

CSS Reference Manual: The border-image-width property

HTML DOM Reference Manual: borderImageRepeat property