CSS Mask Parallax Demo - Online Scroll Reveal Effect
Use CSS masks and fixed backgrounds to create a unique parallax reveal effect. Copy the code. No JavaScript.
UD5 Toolkit
Copy and paste this CSS into your stylesheet. Works with any <div> that has a background image.
CSS mask-image is a property that lets you use an image, gradient, or SVG as a mask layer to hide or reveal portions of an element. Similar to how alpha channels work in image editing, the mask's luminance determines visibility: black areas hide the element, white areas reveal it, and gray values create partial transparency. This tool generates mask-image CSS with proper -webkit- prefixes for cross-browser compatibility. Masking is GPU-accelerated in most modern browsers, making it performant for animations.
While both can hide parts of an element, they work differently. clip-path creates a hard vector-based crop with sharp edges and no soft transitions. mask-image supports alpha transparency, allowing smooth feathered edges, gradient fades, and soft vignette effects. Use clip-path for geometric crops with sharp boundaries, and mask-image for artistic reveals with soft edges, blur transitions, or luminance-based transparency effects.
CSS mask-image is supported in all modern browsers: Chrome 120+, Firefox 53+, Safari 15.4+, and Edge 120+. For older Safari and Chrome versions (pre-2023), the -webkit-mask-image prefix is required. This tool automatically generates both the standard and -webkit- prefixed versions to ensure maximum compatibility. As of 2024, global support exceeds 94% of web users. For IE11, consider using SVG masks as a fallback.
You can create custom SVG masks by defining a <mask> element in SVG and referencing it via mask-image: url(#mask-id), or inline the SVG as a data URI. For example, use an SVG <path> with any custom shape as the mask source. The key principle: white fill in the SVG = visible area, black = hidden. This tool generates inline SVG data URIs for heart, star, and diamond shapes so the CSS is self-contained without external files.
Yes! CSS mask properties including mask-size, mask-position, and gradient-based masks can be animated using CSS transition or @keyframes. This tool generates ready-to-use animation keyframes for zoom reveals, directional wipes, and pulsing effects. For best performance, animate mask-size and mask-position rather than recreating the mask on each frame, as these trigger compositor-only repaints (no layout recalculations).
Feathering (soft edge) controls how gradually the mask transitions from fully visible to fully hidden. A feather of 0 creates a hard, sharp edge. Higher feather values create a smooth gradient fade at the mask boundary, which is essential for natural-looking vignettes, spotlight effects, and professional image reveals. For gradient-based masks (circle, ellipse), feathering is achieved by expanding the gradient transition zone. For SVG shapes, a feGaussianBlur filter is applied.
CSS masks are generally GPU-accelerated and performant. Using radial-gradient or linear-gradient as masks is extremely efficient. SVG-based masks with complex paths or heavy blur filters may have a slightly higher rendering cost but are still well-optimized in modern browsers. For the best performance on image-heavy pages, avoid animating dozens of masked elements simultaneously and prefer gradient-based masks over complex SVG filters when possible.
Use CSS masks and fixed backgrounds to create a unique parallax reveal effect. Copy the code. No JavaScript.
See how overflow: visible, hidden, scroll, and auto behave with real content. Clone to test with your text.
Customize falling snow particles with pure CSS or canvas. Adjust speed, size, and wind. Copy the code for your website.
Pixelate or censor parts of an image by dragging. Adjust block size for mosaic effect. Useful for hiding faces or sensitive data. Client-side processing.
Apply contentâvisibility: auto to offâscreen sections and see the rendering cost drop. Demos for infinite scroll optimization.
Pixelate selected areas of an image to hide faces or sensitive data. Adjust block size. Download the censored result.
Draw shapes and experiment with globalCompositeOperation. See PorterâDuff operators in action. Great for game devs.
Toggle contentâvisibility: auto on long blocks and see the rendering time difference. Understand this powerful property.
Generate an <img> tag with the loading='lazy' attribute and optional lowâquality placeholder. Improve Core Web Vitals. Copy the snippet.
Register and apply a custom paint worklet to draw a background pattern dynamically. Write the paint function in the browser.
Select any HTML element on a page and capture its screenshot. Download as PNG. Perfect for bug reports. JavaScript API demo.
Visually create the glassmorphism effect: background blur, transparency, and border. Copy the complete CSS. Modern UI design.
Create a pure CSS scroll progress indicator using animationâtimeline: scroll(). No JavaScript. Copy the complete code.
Write a paint worklet in JavaScript and see it used as a CSS background instantly. Experiment with Houdini. Local.
Generate a complete <head> section with meta charset, viewport, SEO, favicon, and social tags. Customize and copy.
Adjust root, margin, and threshold. See a live log of intersection events as you scroll. Debug lazy loading.
Create an animation that advances with scroll using animationâtimeline: scroll(). See the visual timeline editor. Modern CSS.
See the View Transitions API in action. Crossâfade and morph between two states. Copy the JavaScript starter code.
Write JavaScript using element.animate() and see the result in a live preview. Compare with CSS keyframes. Debugger included.
Limit browser gestures on an element: panâx, pinchâzoom, manipulation. Draw on a canvas to test. Mobile dev helper.
A customisable Matrixâstyle digital rain animation. Adjust speed, characters, and colors. Fullscreen mode for ambiance.
Create a custom element with named slots and see content projection in action. Learn Web Components basics.
Type raw HTML and see the escaped version, then see how it renders when unescaped. Understand encoding better.
Upload a small image and see it tiled as a canvas pattern. Export the pattern or copy the JavaScript.
Take a screenshot of the current browser tab using Screen Capture API. Crop, annotate with text and arrows, and download as PNG. Local only.
Paste HTML/CSS and render it to a canvas image. Download as PNG. For creating dynamic social share images.
Assign Secret Santa pairings from a list of names with spouse/partner exclusions. Optionally email results via mailto link. Fully local, no server.
Move your mouse or finger to create colorful paint splatters on canvas. Great stress reliever. Download as PNG.
Write or paste HTML, CSS, and JavaScript and instantly see the rendered output in a sandboxed iframe. A handy frontend prototyping tool.
Add many complex CSS styles and measure frames per second. Isolate expensive properties. Practical performance lab.