mask-image
Widely availableSince 202397% of users
Sets the image that will be used as the masking layer for an element. It allows you to selectively hide parts of an element using gradients or transparent images.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since December 2023. Widely available since June 2026.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
none- Inherited
- No
- Applies to
- all elements and SVG container elements
- Animation type
- discrete
Quick example
.fade-out {
mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
/* fades out the bottom half of the element */
}mask-image browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
120+
53+
15.4+
120+Mobile
120+Android
53+Android
15.4+iOS