mask-border
Limited availability94% of users
A shorthand property that lets you use an image as a 'border mask' for an element. This allows you to create decorative borders that are defined by an external image file.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Chrome, Edge or Firefox yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
See individual properties- Inherited
- No
- Applies to
- all elements and SVG container elements
Quick example
.decorative-box {
mask-border: url('border.png') 30 fill stretch;
/* applies a custom image-based border to the element */
}Values
mask-border-modemask-border browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage94%of people can use this6% use a browser without it.
Browsers
17.2+Mobile
17.2+iOS