The border-image-repeat
CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image.
The border-image-repeat
CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image.
/* Keyword value */ border-image-repeat: stretch; border-image-repeat: repeat; border-image-repeat: round; border-image-repeat: space; /* vertical | horizontal */ border-image-repeat: round stretch; /* Global values */ border-image-repeat: inherit; border-image-repeat: initial; border-image-repeat: revert; border-image-repeat: revert-layer; border-image-repeat: unset;
The border-image-repeat
property may be specified using one or two values chosen from the list of values below.
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 value | stretch |
---|---|
Applies to | all elements, except internal table elements when border-collapse is collapse . It also applies to ::first-letter . |
Inherited | no |
Computed value | as specified |
Animation type | discrete |
#bordered { width: 12rem; margin-bottom: 1rem; padding: 1rem; border: 40px solid; border-image: url("border.png") 27; border-image-repeat: stretch; /* Can be changed in the live sample */ }
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
border-image-repeat |
15 |
12 |
15 |
11 |
15 |
6 |
4.4 |
18 |
15 |
14 |
9.3 |
1.0 |
round |
30 |
12 |
15 |
11 |
17 |
9.1 |
≤37 |
30 |
15 |
18 |
9.3 |
2.0 |
space |
56 |
12 |
50 |
11 |
43 |
9.1 |
56 |
56 |
50 |
43 |
9.3 |
6.0 |
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-repeat