Loading…

How to use CSS Mask Fade Generator

Set the fade direction and distance, and the tool renders a live preview with the matching mask-image gradient CSS.

Frequently asked questions

How does a CSS mask fade work?

A linear-gradient mask makes parts of an element transparent based on the gradient's black-to-transparent stops.

Do I need the -webkit- prefix?

Yes for older WebKit browsers, so both mask-image and -webkit-mask-image are generated.

Can I fade multiple edges?

This tool fades one direction at a time; combine masks manually for multi-edge fades.

More CSS Generators

CSS 3D Perspective Generator
Rotate elements in 3D space with perspective and live preview
CSS Aspect Ratio Generator
Get aspect-ratio plus the padding-hack fallback for any ratio
CSS Multi-Column Generator
Build newspaper-style column-count layouts with column rules
CSS Object Fit Generator
Preview object-fit and object-position on images live
CSS Line Clamp Generator
Truncate multi-line text with -webkit-line-clamp ellipsis
CSS Writing Mode Generator
Set vertical and horizontal writing-mode with text-orientation
CSS Image Rendering Generator
Control pixelated vs smooth image-rendering with live preview
CSS Type Scale Generator
Generate a modular type scale as CSS custom properties
CSS Hex to RGBA Converter
Convert hex colors to rgba() with an adjustable alpha channel
CSS Gradient Generator
Build linear, radial and conic gradients with live preview
CSS Box Shadow Generator
Create layered box shadows with full control and preview
CSS Text Shadow Generator
Generate text shadow effects with live typography preview

← View all CSS GeneratorsBrowse all 1,100+ tools →