CSS Reveal Footer

A footer that sits underneath the page and is uncovered as the content scrolls away, like lifting a curtain.

  • footer
  • curtain
  • parallax
  • position sticky
  • z-index
HTML
<div class="reveal-page">
  <main class="reveal-page-main">
    <h2>Keep scrolling</h2>
    <p>The footer is waiting underneath this page.</p>
  </main>
  <footer class="reveal-page-footer">Studio 2026</footer>
</div>
CSS
.reveal-page {
  font: 15px/1.5 system-ui, sans-serif;
}

/* The page slides over the footer */
.reveal-page-main {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 24px;
  border-radius: 0 0 24px 24px;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 16px 32px -16px #0f172a59;
}

.reveal-page-main h2 {
  margin: 0 0 8px;
  color: #0f172a;
}

/* Sticks to the bottom, behind the page, until the page scrolls past */
.reveal-page-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  place-items: center;
  min-height: 240px;
  background: #0f172a;
  color: #e2e8f0;
  font-weight: 600;
}

About this CSS Reveal Footer

This CSS Reveal Footer is 33 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses box shadows, CSS Grid and sticky positioning. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #ffffff
  • #334155
  • #0f172a59
  • #0f172a
  • #e2e8f0

How to use this reveal footer

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .reveal-page class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback