border-image-repeat
Quick Summary for border-image-repeat
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.
Code Usage for border-image-repeat

<pre class="brush: css notranslate"><code><span class="token comment">/ Keyword value /</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> stretch<span class="token punctuation">;</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> repeat<span class="token punctuation">;</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> round<span class="token punctuation">;</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> space<span class="token punctuation">;</span> <span class="token comment">/ vertical | horizontal /</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> round stretch<span class="token punctuation">;</span> <span class="token comment">/ Global values /</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> inherit<span class="token punctuation">;</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> initial<span class="token punctuation">;</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> revert<span class="token punctuation">;</span> <span class="token property">border-image-repeat</span><span class="token punctuation">:</span> unset<span class="token punctuation">;</span> </code></pre>

More Details for border-image-repeat

border-image-repeat

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.

Syntax

/* 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: unset; 

The border-image-repeat property may be specified using one or two values chosen from the list of values below.

When one value is specified, it applies the same behavior on all four sides. When two values are specified, the first applies to the top and bottom, the second to the left and right.

Values

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.

Formal definition

Initial valuestretch
Applies toall elements, except internal table elements when border-collapse is collapse. It also applies to ::first-letter.
Inheritedno
Computed valueas specified
Animation typediscrete

Formal syntax

[ stretch | repeat | round | space ]{1,2}

Examples

Repeating border images

CSS
#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 */ } 
Results

Specifications

Specification
CSS Backgrounds and Borders Module Level 4 # the-border-image-repeat

See also

Backgrounds and borders Learn CSS: Backgrounds and borders

Last modified: Aug 12, 2021, by MDN contributors

Select your preferred language English (US)DeutschEspañolFrançais日本語한국어Русский中文 (简体) Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
When i was a little kid, I was really scared of the dark. But then I came to understand, dark just means the absence of photons in the visible wavelength -- 400 to 700 nanometers. Then i thought, well, its really silly to be afraid of a lack of photons. Then i wasn't afraid of the dark anymore after that.
Elon Musk
Latest News
## 🚀 AI Giants Hit Bullseye: Anthropic & OpenAI Achieve Product-Market Fit Anthropic and OpenAI have reached a significant milestone, finding product-market fit with their AI technologies, which means their products effectively meet the needs of their customers, driving growth and adoption. This achievement showcases the practical value of their innovations, enabling businesses and individuals to leverage AI for enhanced productivity and efficiency. With this alignment of product and market needs, these companies are poised to transform industries and shape the future of technology.