# Fullscreen Overlay Menu

> A menu button that opens a full-screen overlay of large links rising into place, built on details.

- Category: [CSS Navigation](https://copy-css.com/category/navigation)
- Tags: hamburger, details, full screen, mobile menu, big links
- Live preview: https://copy-css.com/snippets/fullscreen-overlay-menu
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<details class="overlay-menu">
  <summary>
    <span class="overlay-menu-open">Menu</span>
    <span class="overlay-menu-close">Close</span>
  </summary>
  <nav aria-label="Main">
    <a href="#">Work</a>
    <a href="#">Studio</a>
    <a href="#">Journal</a>
    <a href="#">Contact</a>
  </nav>
</details>
```

## CSS

```css
.overlay-menu summary {
  position: relative;
  z-index: 11;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font: 600 14px system-ui, sans-serif;
  list-style: none;
  cursor: pointer;
}

.overlay-menu summary::-webkit-details-marker {
  display: none;
}

.overlay-menu summary:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 3px;
}

.overlay-menu[open] summary {
  background: #ffffff;
  color: #0f172a;
}

.overlay-menu-close,
.overlay-menu[open] .overlay-menu-open {
  display: none;
}

.overlay-menu[open] .overlay-menu-close {
  display: inline;
}

.overlay-menu nav {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  gap: 6px;
  background: #0f172a;
  text-align: center;
  animation: overlay-menu-fade 0.3s ease;
}

.overlay-menu nav a {
  color: #f8fafc;
  font: 800 clamp(28px, 6vw, 48px)/1.15 system-ui, sans-serif;
  text-decoration: none;
  animation: overlay-menu-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.overlay-menu nav a:nth-child(2) {
  animation-delay: 0.05s;
}

.overlay-menu nav a:nth-child(3) {
  animation-delay: 0.1s;
}

.overlay-menu nav a:nth-child(4) {
  animation-delay: 0.15s;
}

.overlay-menu nav a:hover {
  color: #a5b4fc;
}

.overlay-menu nav a:focus-visible {
  border-radius: 4px;
  outline: 2px solid #a5b4fc;
  outline-offset: 4px;
}

@keyframes overlay-menu-fade {
  from { opacity: 0; }
}

@keyframes overlay-menu-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .overlay-menu nav,
  .overlay-menu nav a { animation: none; }
}
```

## Notes

- This CSS Fullscreen Overlay Menu is 91 lines of pure CSS (1.6 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, CSS Grid and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
