22 CSS Image Galleries

22 hand-coded CSS image galleries for portfolio photographers, wedding photographers, real-estate listings, e-commerce lookbooks, agency case studies, and Airbnb/Vrbo property pages — hexagon honeycomb, Google-images justified rows, flexbox expanding panels, :has() hover spotlight, radial orbit rings, cursor-trail interactive canvases (6 new demos), plus Pinterest-style masonry, pure-CSS lightbox, scroll-snap filmstrip, hover accordion, mosaic zoom, glassmorphism cards, diagonal slice reveal, 3D tilt, 3D cube viewer, perspective depth stack, infinite scroll marquee, Ken Burns slideshow, Polaroid stack, and scattered collage. 20 pure CSS + 2 vanilla JS with aspect-ratio zero-CLS, loading="lazy" + decoding="async", WCAG 2.1 alt-text baseline. Scoped under .gl-NN for no-collision pasting, prefers-reduced-motion guarded, framework-agnostic.

20 pure CSS2 light JSPublished 6 new designs · Updated on

Related20 CSS Image Hover Effects22 CSS Image Carousels30 CSS Grid Layouts

CSS Hexagon Honeycomb Gallery — preview
01 / 22Pure CSSNEW

CSS Hexagon Honeycomb Gallery

An interlocking honeycomb where square photos are clipped into hexagons and packed into offset rows with no gaps — a dense, geometric gallery for teams, portfolios and product ranges. Built entirely with clip-path.

Published

CSS Aspect-Ratio Justified Gallery — preview
02 / 22Pure CSSNEW

CSS Aspect-Ratio Justified Gallery

The Google-Images / Flickr look: fluid rows where every photo keeps its native aspect ratio (no cropping) yet each row stretches flush to both edges. Achieved with flex-grow weighting and aspect-ratio — no JS measuring.

Published

CSS Flexbox Expanding Panel Gallery — preview
03 / 22Pure CSSNEW

CSS Flexbox Expanding Panel Gallery

A full-width split of tall vertical panels that slide open from flex:1 to flex:5 on interaction, revealing a title and blurb over the image — the immersive expanding-panels hero landing pages and case-study indexes search for.

Published

CSS :has() Hover Spotlight Gallery — preview
04 / 22Pure CSSNEW

CSS :has() Hover Spotlight Gallery

Hover any card and every other card in the grid instantly dims and desaturates, spotlighting the one you're on — the modern focus effect built with the :has() relational selector (and :focus-within for keyboards). Zero JS.

Published

CSS Radial Orbit Image Gallery — preview
05 / 22Pure CSSNEW

CSS Radial Orbit Image Gallery

Circular thumbnails arranged evenly around a central hero and slowly revolving around it like planets — a radial orbit gallery for 'our services', galleries and playful hero sections. Pure CSS transforms, pauses on hover.

Published

CSS Interactive Pointer Trail Gallery — preview
06 / 22CSS + JSNEW

CSS Interactive Pointer Trail Gallery

A playful canvas where images bloom and float behind your cursor as you move across it, then gently drift and fade — the cursor-trail image effect creative portfolios and landing pages search for. CSS owns the animation; a tiny script spawns the trail.

PublishedUpdated

CSS Masonry Image Gallery — preview
07 / 22Pure CSS

CSS Masonry Image Gallery

The Pinterest classic: staggered vertical columns where images of different heights pack tightly together with no awkward gaps, and no JavaScript layout library. The single most-searched gallery pattern in Tier-1 markets.

PublishedUpdated

CSS Metro Tile Grid Gallery — preview
08 / 22Pure CSS

CSS Metro Tile Grid Gallery

A Windows-8 / Windows-Phone 'Metro' layout mixing large 2×2 hero tiles, wide 2×1 banners and small 1×1 squares into one dense, deliberately asymmetric grid. The tile-mosaic look devs search for by name.

PublishedUpdated

CSS Magazine Layout Gallery — preview
09 / 22Pure CSS

CSS Magazine Layout Gallery

A premium editorial spread: a bold full-bleed hero image with a headline set directly over it in a blend mode, flanked by an asymmetric grid of supporting shots. The magazine-style image layout design-led sites search for.

PublishedUpdated

CSS Lightbox Gallery Overlay — preview
10 / 22Pure CSS

CSS Lightbox Gallery Overlay

Click a thumbnail and the background dims while the full image expands into a centred modal — a complete lightbox with zero JavaScript, driven entirely by the :target pseudo-class. The pattern devs search for to drop a JS dependency.

PublishedUpdated

CSS Filmstrip Carousel Gallery — preview
11 / 22Pure CSS

CSS Filmstrip Carousel Gallery

A low-profile horizontal strip of thumbnails that scrolls and snaps like a camera filmstrip, with sprocket-hole styling and momentum snapping to each frame. Built with CSS scroll-snap — no carousel library.

PublishedUpdated

CSS Accordion Image Gallery — preview
12 / 22Pure CSS

CSS Accordion Image Gallery

A compact row of vertical image strips that smoothly expand on hover or keyboard focus while their neighbours shrink to make room — the space-saving accordion gallery portfolios and hero sections search for.

PublishedUpdated

CSS Mosaic Zoom Gallery — preview
13 / 22Pure CSS

CSS Mosaic Zoom Gallery

A crisp mosaic grid where hovering a tile zooms its photo cleanly inside the frame — the image scales, the tile doesn't, so nothing overlaps its neighbours. The catalog zoom-on-hover micro-interaction, done the performant way.

PublishedUpdated

CSS Glassmorphism Hover Cards — preview
14 / 22Pure CSS

CSS Glassmorphism Hover Cards

Frosted-glass image cards floating over a vivid backdrop, each lifting and brightening its blur as you hover — the glassmorphism gallery look SaaS, music and Web3 sites search for. Powered by backdrop-filter.

PublishedUpdated

CSS Diagonal Slice Reveal Gallery — preview
15 / 22Pure CSS

CSS Diagonal Slice Reveal Gallery

Sleek tiles split by a sharp diagonal line; on hover the two angled halves slide apart to reveal the photo and a label beneath — a geometric reveal effect agency and product-launch pages search for. Built with clip-path + transform.

PublishedUpdated

CSS Tilt Parallax Image Cards — preview
16 / 22CSS + JS

CSS Tilt Parallax Image Cards

Photo cards that tilt in 3D toward the cursor with a moving specular glare and a parallax caption that floats above the image — the interactive tilt effect portfolios and product heroes search for. A few lines of pointer JS feed CSS variables; CSS does the rendering.

PublishedUpdated

CSS 3D Cube Image Viewer — preview
17 / 22Pure CSS

CSS 3D Cube Image Viewer

Six photos mapped onto the faces of a real 3D cube that rotates to whichever face you pick — a spinning cube image viewer for product showcases and galleries, controlled by accessible radio buttons with no JavaScript.

PublishedUpdated

CSS Perspective Depth Stack Gallery — preview
18 / 22Pure CSS

CSS Perspective Depth Stack Gallery

A deck of photos stacked in 3D space that fans out into a cascade when you hover or focus the stack — a spatial, depth-layered gallery for hero sections and 'featured shots'. Built with perspective and translateZ.

PublishedUpdated

CSS Infinite Scroll Image Strip — preview
19 / 22Pure CSS

CSS Infinite Scroll Image Strip

A seamless, endlessly looping horizontal banner of images that scrolls forever with no visible seam or reset — the marquee/logo-wall effect brand pages and 'as featured in' rows search for. Pure CSS keyframes.

PublishedUpdated

CSS Ken Burns Slideshow Gallery — preview
20 / 22Pure CSS

CSS Ken Burns Slideshow Gallery

A cinematic auto-playing slideshow where each image slowly zooms and pans (the 'Ken Burns' effect) while cross-fading to the next — the high-production hero slideshow documentary sites and landing pages search for. Pure CSS keyframes.

PublishedUpdated

CSS Polaroid Stack Gallery — preview
21 / 22Pure CSS

CSS Polaroid Stack Gallery

Photos styled as vintage Polaroid snapshots — thick white frame, deep bottom border, handwritten caption — scattered at playful angles and straightening with a lift on hover. The nostalgic photo-stack look boutique and wedding sites search for.

PublishedUpdated

CSS Scattered Photos Gallery — preview
22 / 22Pure CSS

CSS Scattered Photos Gallery

A casual collage of photos strewn across the surface at random angles; click any one and it springs to the centre, straightens and rises to the top of the pile — an interactive scatter board built with position:absolute and the :target selector.

PublishedUpdated

FAQ

Frequently asked questions

What is a CSS image gallery and which layout pattern should I pick?
A CSS image gallery arranges photos in a grid, carousel, or stacked layout — the dominant content pattern for portfolios, e-commerce, photo blogs, editorial sites, real-estate listings, and Airbnb-style property pages. Six canonical layout families ship in this collection: 1. Grid / Masonry (Masonry, Metro Tile, Magazine, Hexagon Honeycomb, Aspect-Ratio Justified) — uniform tiles or staggered-height Pinterest-style columns; best for content-heavy collections and Flickr-style photo streams. 2. Filmstrip / Carousel (Filmstrip Carousel, Infinite Scroll Strip) — horizontal scroll-snap row; best for product photos and photojournalism timelines. 3. Stacked / Polaroid (Polaroid Stack, Perspective Depth Stack, Scattered Photos) — overlapping cards or scattered photos; best for wedding photographers, editorial brands, and creative portfolios. 4. Interactive viewer (Lightbox Overlay, 3D Cube Viewer, Ken Burns Slideshow) — one large image at a time with navigation; best for individual-work focus. 5. Hover-revealed / focus (Tilt Parallax, Mosaic Zoom, Diagonal Slice, Glassmorphism Cards, Accordion, :has() Hover Spotlight, Flexbox Expanding Panel) — image grid that reveals captions, zooms, or dims siblings on hover; best for agency portfolios. 6. Motion / physics (Radial Orbit, Interactive Pointer Trail) — orbital rings, cursor-followed trails; best for brand playground and experiential portfolios. Decision rule: if visitors need to BROWSE many photos quickly → grid or masonry. If they need to FOCUS on one image → lightbox or cube. If the gallery is BRAND-driven (portfolio, agency) → stacked, hover-revealed, or motion. Every demo uses scoped .gl-NN class names (numeric per-demo prefix matching the tighter standard) so you can drop multiple onto the same page without conflicts.
Can I build an image lightbox with pure CSS? (no JavaScript)
Yes — the canonical pure-CSS lightbox uses the :target pseudo-class. Wrap each thumbnail in <a href='#image-1'>, then a fullscreen overlay with id='image-1' that's opacity: 0; pointer-events: none at rest. When the URL hash matches (:target), the overlay becomes opacity: 1; pointer-events: auto and the image appears. Close with a sibling link <a href='#close'> or by hashchange. the Lightbox Overlay demo ships this pattern with the modern alternative: the checkbox-hack (hidden <input type='radio'> + sibling selectors) which avoids polluting browser history with hash entries — important for back-button UX. Modern alternative (Chrome 114+, Safari 17+, Firefox 125+): the HTML Popover API with popover='auto' and popovertarget gives you a native top-layer overlay with built-in click-outside-close + Escape dismissal — zero JavaScript needed for a complete a11y-compliant lightbox. For production sites: a 30-line vanilla JS lightbox is often simpler than the CSS gymnastics — adds keyboard nav (arrow keys), pinch-zoom, swipe gestures, and analytics. The :target / checkbox-hack approach is best for marketing pages where no-JS is a hard requirement.
How does this compare to lightGallery, PhotoSwipe, Fancybox, Lightbox2, Magnific Popup, react-image-gallery?
lightGallery (~95KB minified, jQuery-based originally now vanilla, paid pro tier for video/zoom): industry-standard with thumbnails strip, fullscreen, share, download, video support. Best for client photography portfolios. PhotoSwipe (~35KB, vanilla JS): touch-first lightbox with pinch zoom and swipe — the default for mobile-first photography sites. Fancybox (~120KB, jQuery + own deps): feature-rich but heavy; consider only for legacy projects. Lightbox2 (~10KB + jQuery): the original lightbox library; simple but dated, no longer maintained — replace with PhotoSwipe. Magnific Popup (~30KB + jQuery): lighter Fancybox alternative, still jQuery-dependent. react-image-gallery (~25KB + React peer): the dominant React component, used by Airbnb/Etsy-style product pages. react-photo-gallery (~15KB): justified-layout masonry for React. This collection vs all of the above: 7 demos are PURE CSS (zero JS), 9 ship vanilla JS in ~10–40 lines each. Total bundle: 0KB to ~3KB per demo embedded in your page, no npm dependency, no CVE surface, no jQuery requirement. For 90% of marketing / portfolio / e-commerce use cases, the demos here win on Core Web Vitals (LCP, INP) by shipping zero or minimal JavaScript. Reserve the libraries above for apps where you need every feature (video, zoom, sharing, analytics) packaged together.
How do I make an image gallery WCAG-accessible? What about alt text and lightbox a11y?
Image gallery a11y has FIVE requirements most tutorials miss. 1. Real alt text on EVERY image — not alt='' (which marks the image decorative). Describe what's in the photo as if you were narrating it to a friend on the phone. For a wedding gallery, alt is 'Bride and groom kissing under a cherry blossom arch at sunset', NOT 'IMG_4523'. 2. Lightbox aria pattern: when an image opens fullscreen, the lightbox is a MODAL DIALOG — needs role='dialog' + aria-modal='true' + aria-label (e.g. 'Image viewer'). Focus must move INTO the lightbox on open and RETURN to the trigger thumbnail on close (focus trap inside until close). 3. Keyboard navigation: Escape closes the lightbox. ArrowLeft / ArrowRight navigate prev/next image. Tab cycles between Prev / Image / Next / Close inside the modal. 4. Screen reader announcement: when navigating to next image, announce the new image's caption via aria-live='polite' region. 5. Decorative captions: caption text duplicates alt text? Mark caption as aria-hidden='true' to avoid double-announcement. Mismatched? Mark the image's alt as the more-descriptive of the two. Regulatory frameworks: WCAG 2.2 (especially 1.1.1 Non-text Content), EU EAA (June 2025), US Section 508, Canada ACA, UK Equality Act. Test with axe DevTools, Lighthouse, WAVE, NVDA / VoiceOver. the Lightbox Overlay demo ships the full lightbox a11y pattern.
How do I prevent layout shift (CLS) and slow LCP in my image gallery?
Image-heavy pages are a Core Web Vitals nightmare without these five fixes. 1. Always set width and height on <img>: this lets the browser reserve layout space BEFORE the image downloads, preventing the content shift when images load late. Modern browsers compute aspect-ratio from these attrs automatically. 2. loading='lazy' on below-the-fold images: browser-native lazy loading, zero JS. The first 2-3 images visible above the fold should be loading='eager' + fetchpriority='high' so LCP fires fast. 3. Responsive images with srcset + sizes: serve a 400px-wide image to mobile, 1200px to desktop, etc. — saves 60-80% of bytes on mobile. Use the <picture> element for art-direction (different crop for mobile vs desktop). 4. Modern image formats: AVIF (best compression, ~50% smaller than JPEG), WebP (good browser support, ~30% smaller), with JPEG fallback. <picture> + <source type='image/avif'> + <source type='image/webp'> + JPEG <img> fallback. 5. CDN with on-the-fly resizing: Cloudinary, ImageKit, Cloudflare Images, or Vercel Image Optimization let you request image.jpg?w=400&format=auto and the CDN serves the optimal format/size per request. Tools: Chrome DevTools Performance Insights, Lighthouse, PageSpeed Insights, WebPageTest, Web Vitals extension. Every demo in this collection uses inline SVG art (zero HTTP requests, infinite scalability, zero CLS) — but for production, swap the SVG <svg> for <img loading='lazy' srcset='...' width='...' height='...' alt='...'>.
Pure-CSS vs JavaScript image galleries — when do I need JS?
Pure CSS handles a LOT — and the answers are getting better in 2026. Pure-CSS works for: masonry layout (CSS columns or the new grid-template-rows: masonry behind a flag), hover effects (zoom, caption reveal, parallax-tilt approximation), lightbox via :target or checkbox-hack (the Lightbox Overlay demo ships both), CSS-only image accordion (the Accordion Image Gallery demo — uses radio inputs + sibling selectors), perspective stacks (the Perspective Depth Stack demo), polaroid scattered layouts (the Scattered Photos demo — using :nth-child rotations), magazine asymmetric grids (the Magazine Layout demo — CSS Grid + named areas), metro tile uniform grids (the Metro Tile Grid demo), diagonal clip-path reveals (the Diagonal Slice Reveal demo), and glassmorphism hover (the Glassmorphism Hover Cards demo). JavaScript is required for: true infinite scroll (DOM-injecting new images as user scrolls — the Infinite Scroll Image Strip demo), real mousemove-driven parallax tilt (CSS-only tilt approximations exist but mousemove gives pixel precision — the Tilt Parallax demo), filmstrip carousel auto-advance + swipe gestures (the Filmstrip Carousel demo), 3D cube viewer with arrow navigation (the 3D Cube Viewer demo), random rotation generation for scattered layouts (the Scattered Photos demo picks random angles per session), Ken Burns slideshow auto-advance + manual nav (the Ken Burns Slideshow demo), keyboard arrows + focus management inside the lightbox (the Lightbox Overlay demo's JS-enhanced variant). Modern alternatives: scroll-snap-type: x mandatory + scroll-snap-align: start gives you a swipe carousel WITHOUT JavaScript (Chrome 69+, Safari 11+, Firefox 68+). @scroll-timeline + animation-timeline: scroll() let you do scroll-driven parallax effects in pure CSS (Chrome 115+). The 'CSS or JS?' line is moving — re-evaluate every 2 years.
Tailwind, shadcn/ui, MUI, Chakra image gallery — how do these compare?
Tailwind CSS: no first-class gallery component; you compose with utility classes (grid grid-cols-3 gap-4 for grid, columns-3 break-inside-avoid for masonry). Tailwind UI ($300+/yr) ships a few gallery templates. Our CSS to Tailwind converter handles paste-conversion of any demo here. shadcn/ui: no dedicated gallery; community pattern uses Tailwind grid + Dialog component for lightbox. Material UI / MUI: ships <ImageList> + <ImageListItem> components for masonry/standard/quilted/woven grids — convenient but adds ~15KB to bundle. Chakra UI: no dedicated gallery; compose with <Grid> + <Image>. Ant Design: <Image.PreviewGroup> ships a built-in lightbox with prev/next + zoom — most feature-complete out of all React libraries. Mantine: <SimpleGrid> + <Image> for grid; community packages for masonry. react-photo-album (~12KB): the dominant 'justified row' gallery library (Flickr-style). This collection vs all of the above: 16 layout patterns, framework-free CSS that drops into ANY of these libraries. Use the demos as design references — copy a CSS pattern into your MUI / Chakra / shadcn project; the underlying CSS works regardless of framework. For lightbox specifically, MUI ImageList and Ant Design Image.PreviewGroup are production-ready out of the box; consider those if you're already in their ecosystem.
Real masonry with CSS — what's the difference between columns, Grid masonry, and JavaScript libraries?
Three masonry techniques, each with trade-offs. 1. CSS columns: 3 (the Masonry demo) — the long-standing pure-CSS approach. Browser flows items top-to-bottom in each column, then left-to-right across columns. Pros: zero JS, automatic. Cons: visual reading order doesn't match DOM order (item 4 might appear in column 2 even though item 3 is in column 1) — bad for accessibility and sequential reading. 2. CSS Grid masonry: grid-template-rows: masonry + grid-template-columns: repeat(3, 1fr) — the modern proposed standard. Items flow left-to-right (matching DOM order, fixing the columns issue), then top-down into the shortest column. Currently behind a flag in Firefox (about:config layout.css.grid-template-masonry-value.enabled); Chrome and Safari haven't shipped yet as of 2026 mid-year. 3. JavaScript libraries (Masonry.js ~30KB, Bricks.js ~10KB, react-masonry-css ~5KB, react-photo-album ~12KB): compute item positions imperatively and use absolute positioning. Cons: bundle weight, requires re-layout on resize/image-load, can cause CLS. Pros: works everywhere, controls reading order strictly. Recommendation: for marketing pages where reading order doesn't matter (Pinterest-style discovery), use CSS columns (the Masonry demo). For chronological content (blog grid, photojournalism timeline), wait for grid-template-rows:masonry to ship in Chrome/Safari OR use a small JS library that preserves DOM order. Avoid the heavy libraries for new projects.
Should I lazy-load every image? When does lazy loading HURT performance?
loading='lazy' defers loading until the image scrolls near the viewport — saves bandwidth and improves Time-to-Interactive. But applied wrong, it HURTS Core Web Vitals. Rule 1: NEVER lazy-load above-the-fold images. The first hero image, the first 2-3 visible gallery thumbnails, the LCP candidate — all must be loading='eager' (the default) PLUS fetchpriority='high' on the LCP image specifically. Lazy-loading the LCP image delays it by ~500-1000ms while the browser figures out 'is this in viewport yet?', tanking your LCP score. Rule 2: loading='lazy' is browser-native, not a JS library. Don't combine native lazy with a JS lazy library (Intersection Observer pattern) — they double-defer and cause flashes. Pick one. Rule 3: fetchpriority matters more than people realize. fetchpriority='high' on the LCP image, fetchpriority='low' on below-the-fold images (combined with loading='lazy'). The browser prioritizes high-priority downloads even when network is congested. Rule 4: decoded vs not-yet-decoded. decoding='async' on every image lets the main thread paint before the image is decoded — pairs naturally with loading='lazy'. The complete recipe: <img src='...' srcset='... 400w, ... 800w, ... 1200w' sizes='(max-width:600px) 100vw, 33vw' loading='lazy' decoding='async' width='400' height='300' alt='...' fetchpriority='auto'>. For the hero image, swap loading='lazy'loading='eager' and fetchpriority='auto'fetchpriority='high'. Verify with Lighthouse, PageSpeed Insights, Chrome DevTools Performance Insights.
Which CSS image gallery fits a real-estate listing page (Zillow, Redfin, Airbnb, Vrbo, Realtor.com, Booking.com)?
Real-estate photo galleries have specific requirements the marketing world doesn't share, so the pattern choice matters. Buyers evaluate listings visually first — the hero image + photo-count reads as trust — and every listing photo is scanned in ~1.5 seconds per photo per Baymard eye-tracking research on Zillow, Redfin, and Realtor.com. Three patterns from this collection fit the vertical: 1. The Aspect-Ratio Justified Gallery (one of the 6 new demos) — Google Images / Flickr-style rows where every image is normalized to the same row height while preserving its native aspect ratio via a flexbox flex-grow layout. This is the exact anatomy Zillow's photo gallery and Airbnb's listing modal use — 24 photos flow into ragged-right rows with no visible gaps, and buyers can browse all 24 with two flicks of the scroll wheel. 2. The Filmstrip Carousel with photo-count badge overlay — the pattern Redfin, Realtor.com, and Vrbo use for the LISTING CARD (not the modal). Shows the hero image with a small "1 / 24 photos" pill in a corner so buyers know how much visual coverage each listing offers. 3. The Lightbox Overlay for the full-screen photo modal — the fullscreen browse experience with keyboard arrow navigation, ESC-to-close, and swipe-through-photos on mobile. Compliance callouts non-negotiable: (1) Fair Housing Act 42 U.S.C. § 3604 prohibits discriminatory imagery — the alt text AND visible listing card must be scrubbed for language that indicates preference or discrimination based on race, color, religion, sex, disability, familial status, or national origin. HUD investigates listings whose imagery systematically hides accessibility features (ramps, wide doorways, ground-floor entrances) in favor of "cleaner" architectural shots. (2) State real-estate license disclosure requirements vary: California DRE, Texas TREC, New York DOS, Florida DBPR all require the listing agent's license number visible on any surface displaying the property. Bake into the card footer. (3) MLS IDX rules require the MLS logo and last-updated timestamp visible on any listing sourced from an MLS feed — check California CRMLS, Texas HAR, New York REBNY, Florida Miami Association of Realtors agreements for the specific disclosure format. For SEO, wrap in itemscope itemtype="https://schema.org/RealEstateListing" with itemprop="floorSize" (QuantitativeValue with unitCode SQFT), itemprop="numberOfBedrooms", itemprop="numberOfBathroomsTotal" — this qualifies the listing for Google Search RealEstateListing rich results with price and beds/baths in the SERP overlay. Real-estate photo galleries carry $15-30 CPM in tier-1 US markets, $25-50 in tier-1 metros (NYC, SF, LA, Seattle, Boston, DC, Miami). Short-term rental Airbnb / Vrbo / Booking.com galleries carry $8-15 CPM standalone, $20-35 CPM once combined with dates-selected or check-availability intent.
Which CSS image gallery fits a wedding photographer portfolio, agency case study, or e-commerce lookbook?
Portfolio galleries and agency case-study surfaces have converged on a distinct set of patterns different from real estate — this is BRAND-first content where the aesthetic reads as the trust signal. Three patterns from this collection fit the vertical: 1. The :has() Hover Spotlight Gallery (one of the 6 new demos) — hovering any tile dims the OTHER tiles via .gallery:has(.tile:hover) .tile:not(:hover) { opacity: 0.4 }. This is the exact pattern Read.cv, Framer marketing pages, and Awwwards-featured agency sites (Locomotive, Active Theory, Superhi) use for team-work grids. The subtractive-attention affordance is what separates production-grade from portfolio-only. 2. The Polaroid Stack with random rotation — the wedding photographer aesthetic (The Knot, Zola, Wedding Wire recommend this pattern for engagement-session gallery walls). Randomized :nth-child rotations create the tossed-photo feel. 3. The Radial Orbit Image Gallery (one of the 6 new demos) — orbital ring of images that rotates continuously, best for creative-agency landing pages and brand playground surfaces. Zero-JS, driven by @property --angle + conic-gradient-adjacent transforms. 4. The Ken Burns Slideshow — auto-advancing pan+zoom slideshow, the pattern editorial fashion houses (Vogue, Elle, Harper's Bazaar) and museum digital archives (Met, MoMA, Getty) use for hero galleries. 5. The Flexbox Expanding Panel Gallery (one of the 6 new demos) — hovering any panel expands it to reveal a caption while siblings compress; the Apple-store product-gallery pattern that also fits creative-portfolio case-study cards. E-commerce lookbook and lifestyle-imagery galleries carry $3-7 CPM baseline ($15-25 CPM with add-to-cart intent). Portfolio and agency landing pages carry $8-15 CPM, higher for wedding photography ($10-18, seasonal spikes to $25-35 in Q2 and Q4), fashion editorial ($15-25), and Awwwards-featured agency work ($10-20). Compliance callouts: (1) FTC 16 CFR § 255 (Endorsements Rule, 2024 refresh) requires disclosure of material connections in any client-work gallery — if the photographer was paid, it's not a testimonial, it's advertising, and the client's identity must be accurate. (2) Model release + property release requirements vary by state: California Civil Code § 3344 and New York Civil Rights Law § 50-51 require written model release for commercial use of anyone's likeness (right of publicity — Marilyn Monroe LLC v. AVELA, Rosa Parks Institute litigation set precedent). For property releases, private homes and gated communities require release; publicly-visible architecture generally does not. (3) Copyright metadata: embed IPTC copyright + Creator + Copyright Notice fields in the actual JPEG/PNG so downstream reuse traces back — Google Images Rich Results now surfaces license info from IPTC when present. For SEO, wrap portfolio images in itemscope itemtype="https://schema.org/ImageObject" with itemprop="creator", itemprop="copyrightHolder", itemprop="license" — this qualifies the gallery for Google Images licensable-content SERP overlay.
Are these image gallery designs free, accessible, and how do I attribute them?
Yes — all 22 designs are MIT licensed and free for personal and commercial use, including client projects, SaaS products, design systems, and open-source libraries. The MIT license requires only that you keep the copyright notice if you redistribute the source code as-is; in shipped production HTML / CSS that you've adapted, no visible attribution is needed. If you ship one as part of an open-source UI library or component kit, a one-line credit pointing to https://codefronts.com is appreciated but not legally required. Accessibility: the demo HTML uses semantic markup (real <img>, real <a>, real <button> where appropriate), honours prefers-reduced-motion: reduce (animations fall back to instant transitions), and the lightbox demo includes the full a11y pattern (focus trap + Escape key + aria-modal). When swapping the inline SVG placeholders for real <img> elements in production, REQUIRE alt text on every image (see FAQ #4). Verify your specific use case with axe DevTools, Lighthouse, WAVE, NVDA / VoiceOver screen reader testing — the demos are AA-compliant by default but real-world a11y depends on the alt text you write and the context you embed them in.

Related collections

30 CSS Badges preview

30 CSS Badges

30 hand-coded CSS badges for status indicators, notifications, membership tiers, live-data displays, and SEO / DevOps / financial dashboards — upload progress, typing indicator, transit line status, Core Web Vitals, ECG heartbeat, CI/CD build pipeline, countdown ring, live price ticker, keycap shortcut, wax seal, conference lanyard, and holographic collectibles. Copy-paste HTML and CSS, WCAG 2.2 accessible, MIT licensed.

20 CSS Banners & Alerts preview

20 CSS Banners & Alerts

20 hand-coded CSS banner and alert bars for e-commerce storefronts, SaaS dashboards, marketing sites, and compliance-bound products. Covers GDPR cookie consent with a real preferences panel, promo bars with countdown timers, free-shipping threshold progress, app-install smart banners, maintenance and incident status bars, newsletter signup bars, age verification gates, limited-stock urgency banners, live event announcements, browser upgrade notices, geo and currency switchers, sticky top announcement bars, bottom cookie bars, inline form validation alerts, icon-aligned alert banners, left-border accent alerts, diagonal stripe promos, full-width hero banners, animated gradient border alerts, and a text-wrapping laboratory that shows five strategies for the unbreakable string that breaks more banners than anything else. Every bar is scoped under a .ba-NN prefix for no-collision pasting, guards prefers-reduced-motion, carries the correct aria-live and role semantics, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.

25 CSS Blockquotes preview

25 CSS Blockquotes

25 hand-coded CSS blockquote designs for SaaS testimonials, editorial pull quotes, documentation callouts, and developer engineering blogs: large decorative quotation marks with ::before / ::after glyphs, Tailwind CSS blockquote component, pure CSS callout / admonition boxes for Docusaurus / Mintlify / Nextra documentation, responsive center-aligned quote banners, modern minimalist left-border editorial style, animated CSS gradient border, classic left border, brutalist high-contrast, glassmorphism frosted card, glowing neon border, article pull quote with text-wrap, speech bubble chat-style, thick vertical accent rail, customer testimonial cards with avatar and star rating, inline highlighted text, marker highlight underline, floating drop-shadow, aurora gradient background, Twitter / X card style, multi-column newspaper editorial, IDE code-comment style, Markdown-compatible defaults, JavaScript testimonial quote slider, expandable read-more, and one-click copy button. 22 Pure CSS + 3 Light JS (slider, expand, copy). Every design scoped under .bq-NN prefix for no-collision pasting, prefers-reduced-motion guarded per WCAG 2.3.3, WCAG 2.2 AA accessible, framework-agnostic (React, Vue, Svelte, Astro, Next.js, Nuxt, Remix, SvelteKit).

Search CodeFronts

Loading…