off canvas top bar

by marusti

HTML

<input type="checkbox" id="toggle-left">

<div class="wrapper">
  <header>
    <div class="top-bar">
      <label for="toggle-left" class="menu-toggle">☰</label>
    </div>

  </header>

  <nav class="menu">
  </nav>
</div>

CSS

header {
  width: 100%;
  height: 60px; 
  background-color:#f1f1f1;}

.menu-toggle {
  text-decoration: none;
  text-align: center;
  width: 44px;
  line-height: 60px;
  font-size: 30px;
  color: rgba(0, 0, 0, 0.5);
  -webkit-transition: all 0.15s ease-out 0s;
  -moz-transition: all 0.15s ease-out 0s;
  transition: all 0.15s ease-out 0s;
  position: absolute;
  z-index: 2; }

.menu-toggle:hover {
  color: #000000; }

#toggle-left {
  display: none; }
#toggle-left:checked ~ .wrapper nav {
  left: 0px; }
#toggle-left:checked ~ .wrapper .menu-toggle {
  left: 220px; }



nav {
  position: fixed;
  top: 0px;
  right: auto;
  bottom: 0px;
  left: -270px;
  -webkit-transition: all 0.15s ease-out 0s;
  -moz-transition: all 0.15s ease-out 0s;
  transition: all 0.15s ease-out 0s;
  height: auto;
  width: 200px;
  background: #111111;
  z-index: 2000; }