Border Image Property

Last updated: 2026-09-13

border-image Border Image Property

border-image lets you use an image to draw an element's border instead of a solid or dashed line. The image is sliced into a nine-part grid (four corners, four edges, and a center area) and each part is mapped to the corresponding border area. It is a powerful tool for complex decorative borders.

Category
Initial Valuenone
InheritedNo
Applies To
Animation Type
CSS VersionCSS3
StatusStandard

📝 Syntax

border-image: <border-image-source> || <border-image-slice> || <border-image-width> || <border-image-outset> || <border-image-repeat>;

⚙️ Values

ValueTypeDescription
<border-image-source> || <border-image-slice> || <border-image-width> || <border-image-outset> || <border-image-repeat>ValueBorder image shorthand

▶ Example

Edit the code below and see the live result in the playground:

🌐 Browser Support

Browser ChromeChrome EdgeEdge FirefoxFirefox SafariSafari OperaOpera
border-image v57 v12 v52 v10.1 v44
Supported in all major browsers
Warning: When using border-image, you must also declare border or border-width, otherwise the image border will not be visible.
Tip: The border-image-slice value is the distance to cut inward from the image edges; the round keyword makes the border image tile and scale to fit the side length.

❓ FAQ

QHow good is browser support for border-image?
AModern browsers (Chrome, Firefox, Edge, Safari) all support it, but IE11 and earlier have limited or no support. Always declare border: solid with border-width as a fallback so browsers without border-image render a normal border; otherwise the element may end up with no border at all.
QWhy doesn't my border show after using border-image?
ACommon causes: no border-width set — border-image does not provide width on its own, so you need border first to create the border area; a wrong image path; or a slice value larger than the actual image. The reliable pattern is border: 20px solid transparent; followed by border-image.
QWhat do slice, repeat, and outset mean in border-image?
Aslice is the distance cut inward from each edge to form the nine-part grid (unitless, treated as pixels or percentages). repeat determines how the edges fill: stretch (stretch), round (tile and scale to fit), and repeat (tile, possibly clipped). outset extends the border image outward. The shorthand order is: url(image) slice / width / outset repeat.
QCan border-image be used together with border-radius?
ANot really. The border-image is not clipped by border-radius, so the rounded area shows protruding image corners or jagged edges, and the combination looks bad. For a 'rounded corner plus image border' effect, simulate it with background-image and padding, or use mask techniques.

📚 Related Tutorials

Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏