CSS IMAGE HOVER OVERLAY GENERATOR
Browse zoom, dim, caption, and icon-reveal hover overlays, and copy the CSS.
In short
Browse image hover overlay effects — zoom, dim with caption, slide-up caption, and icon reveal — pick a color and caption, preview live, and copy the CSS and HTML. No JavaScript, runs entirely in your browser.
.hover-overlay {
position: relative;
overflow: hidden;
border-radius: 10px;
}
.hover-overlay-img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.hover-overlay::before {
content: "";
position: absolute;
inset: 0;
background: #201d19cc;
opacity: 0;
transition: opacity 0.3s ease;
}
.hover-overlay-caption {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
text-align: center;
color: #fff;
opacity: 0;
transition: opacity 0.3s ease;
}
.hover-overlay:hover, .hover-overlay.force::before,
.hover-overlay:hover .hover-overlay-caption, .hover-overlay.force .hover-overlay-caption {
opacity: 1;
}How to use an image hover overlay
- 1
Hover (or turn on Force preview) each card to see the overlay effect live.
- 2
Type a caption and pick an overlay color.
- 3
Click a card to select that effect.
- 4
Copy the CSS and HTML, then swap the placeholder src for your own image.
Questions
- Why does the demo use a gradient box instead of a real photo?
- This tool runs entirely client-side with no uploads, so the gallery stands in with a gradient placeholder. The generated HTML uses a normal <img> tag — just point src at your own image and the overlay CSS works exactly the same over a real photo.
- Why is overflow: hidden important on the wrapper?
- The Zoom effect scales the image past its container's edges (transform: scale(1.12)), and the Slide-up Caption effect starts its caption translated fully below the box. Without overflow: hidden on .hover-overlay, both would spill outside the rounded corners.
- Can I use these overlays on a background-image div instead of an <img>?
- Yes — swap .hover-overlay-img for a div with background-size: cover; background-position: center and the same hover rules apply unchanged, since the effects only target opacity, transform, and background on the wrapper and overlay elements.
- How do I make the overlay show on tap for mobile?
- CSS :hover doesn't fire reliably on touchscreens. For a tap-to-reveal version, add a small script that toggles a .force (or similarly named) class on tap, matching the class this tool's Force preview checkbox simulates — the CSS rules already work with it.
- Does this tool store or upload anything?
- No — every effect, caption, and color is generated and rendered locally in your browser. Nothing is sent to a server.
Related tools
- CSS Holographic Foil Card GeneratorBuild a holographic trading-card foil effect with a rainbow, gold or silver sheen and cursor-following glare, then copy the CSS, HTML and script.
- CSS 3D Tilt Card GeneratorBuild a card that tilts in 3D on hover with perspective and rotateX/rotateY, tune the angle and glare, and copy the CSS.
- CSS Button Hover Effects GeneratorBrowse a gallery of button hover effects — sweep, fill, shine, ripple, lift, and outline grow — and copy the CSS.
- CSS Link Underline Effects GeneratorBrowse a gallery of 10 hover underline effects for links — slide in, center out, double line, dot grow, and more.
- CSS CRT / Scanlines / VHS GeneratorBuild a retro CRT screen overlay with scanlines, vignette, phosphor tint, and flicker animation, then copy the CSS.
- CSS Duotone Image Effect GeneratorMap an image's dark and light tones to two colors with an SVG filter, tune contrast on your own photo, and copy the CSS and filter code.
- CSS Modal GeneratorDesign a modal dialog with a fading overlay — width, radius, colors, overlay opacity, shadow — and copy the CSS and HTML.
- CSS Tooltip GeneratorDesign a hover tooltip — position, colors, font size, corner radius, arrow — and copy the CSS and HTML.
Updated