GitHub 6740★

Have you seen CSS Scan?

The fastest and easiest way to check, copy and edit CSS.

Learn more →

CSS Scan logo

Full screen menu

HTML

<div class="full-screen-menu">
<!-- The navigation menu -->
<ul>
...
</ul>

<!-- The close button -->
<button type="button" class="full-screen-menu__close"></button>
</div>

CSS

.full-screen-menu {
/* Full screen overlay */
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;

/* Center the content */
align-items: center;
display: flex;
justify-content: center;
}

.full-screen-menu__close {
/* Shown at top left corner */
left: 1rem;
position: absolute;
top: 1rem;
}

You can use the close button to create a button for closing the menu.

Demo
Follow me on and to get more useful contents.