mask-image lets you fade an element’s edges or punch a soft spotlight into
it using nothing but a CSS gradient — no Photoshop, no PNG masks. This generator
builds the common masks and copies a cross-browser declaration.
Mask styles
| Style | Effect |
|---|---|
| Fade bottom / top | Image dissolves into the page along one edge |
| Fade top + bottom | Both horizontal edges fade — good for scroll areas |
| Fade left + right | Vertical edges fade — good for carousels |
| Spotlight | Centre stays solid, edges fade to nothing |
| Vignette | Centre fades out, edges stay — inverse spotlight |
The output
-webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
The falloff slider moves the colour stops so you control how gradual the
transition is. The -webkit- prefixed line is included because Safari still
needs it.
Because the mask is a gradient, it adds no image files and the underlying element is never modified — the effect is applied purely at render time. The live preview and generation run in your browser.