Masking reveals selected parts of content via alpha/luminance masks for advanced visual effects.
Masking concepts
mask-imagesource.mask-sizeandmask-position.- Vendor-prefixed behavior considerations.
Pitfall
Masking support and rendering behavior vary across browsers; test fallbacks for critical UI.
Important interview questions and answers
- Q: Masking vs clip-path?
A: Masking uses alpha/luminance gradients; clip-path uses geometric clipping. - Q: Why provide fallbacks?
A: Visual support differs and masked content can disappear unexpectedly. - Q: Best use case?
A: Decorative edges, fades, and reveal effects where fallback is acceptable.
Practice: Change one property in the playground and observe cascade + layout in DevTools.