<a class="toggle" href="#menu">
  ☰
</a>

<nav id="menu">
  <ul>
    <li>Three</li>
    <li>Little</li>
    <li>Pigs</li>
  </ul>
  <a href="#0">ⓧ</a>
</nav>
@keyframes stateChanger {
  50% {
    visibility: visible;
    opacity: 1;
  }
}

nav {
  opacity: 0;
  visibility: hidden;
  animation: stateChanger 200000s steps(1) forwards;
  
  background: #222;
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.5rem 3rem;
}
nav:target {
  animation-delay: -100000s;
}
nav a {
  color: white;
  text-decoration: none;
  position: absolute;
  top: 4px;
  right: 4px;
}

.toggle {
  font-size: 25px;
  text-decoration: none;
}
nav ul {
  list-style: none;
  padding: 1.5rem 0 0 0;
  margin: 0;
}
nav ul li {
  text-align: center;
  padding: 0.25rem 1rem;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.