What is the CSS border-image-repeat property?
The border-image-repeat property is used to specify whether the border-image should be round, repeated, or stretched.
It is a shorthand property of the following:
border-image-sourceborder-image-sliceborder-image-widthborder-image-outsetborder-image-repeat
Syntax
border-image-repeat: round|repeat|stretch|initial|inherit;
Use this to set to both the horizontal and vertical sides:
border-image-repeat: value;
Use this to set to the horizontal and vertical sides separately:
border-image-repeat: horizontal-Value Vertical-Value;
Property value
The following are the property values:
-
repeat:The image will be repeated (i.e., tiled) to fill the area. -
round:The image will be repeated (i.e., tiled) to fill the area, but if it doesn’t fill the area with a whole number of tiles, it will re-scale the image to fit the area. -
stretch:The image will stretch to fill the area (i.e., from one side to the other). It is also the default value. -
initial:This is used to set the image to the default value. -
inherit:This is used to inherit the property from the parent element.
Code
The following is the basic HTML & CSS code to demonstrate the use of border-image-repeat property.