Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <input type="checkbox" id="open" />
<article>
  <div id="container">
    <div id="alt_menu">
      <div id="alt_menu_left" class="alt_menus">
        <div class="alt_menu_inner">
          <div>
            <menu>
              <li>
                <div class="icon"></div>
              </li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><div class="icon2"></div></li>
            </menu>
          </div>
        </div>
      </div>
      <div id="alt_menu_right" class="alt_menus">
        <div class="alt_menu_inner">
          <div>
            <menu>
              <li>
                <div class="icon"></div>
              </li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><span></span></li>
              <li><div class="icon2"></div></li>
            </menu>
          </div>
        </div>
      </div>
    </div>
    <nav id="menu_wrap">
      <menu>
        <li>
          <div class="icon"></div>
        </li>
        <li><label for="open"><span></span></label></li>
        <li><label for="open"><span></span></label></li>
        <li><label for="open"><span></span></label></li>
        <li><label for="open"><span></span></label></li>
        <li><label for="open"><span></span></label></li>
        <li><label for="open"><span></span></label></li>
        <li><div class="icon2"></div></li>
      </menu>
    </nav>
    <section id="content">
      <header>
        <label for="open"></label>
      </header>
      <section id="body">
        <h1>Navigation<br>&#8220;Fold-Out&#8221; Effect</h1>  
        <div class="txt">
          <div class="img"></div>
            <span></span>
            <span></span>
            <span></span>
          </div>
        <div class="txt">
          <div class="img"></div>
          <span></span>
          <span></span>
          <span></span>
        </div>
        <div class="txt">
          <div class="img"></div>
          <span></span>
          <span></span>
          <span></span>
        </div>
        <div class="txt">
          <div class="img"></div>
          <span></span>
          <span></span>
          <span></span>
        </div>
      </section>
    </section>
  </div>
</article>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Maven+Pro);

html,body{
	min-height: 100%;
	width: 100%;
	margin: 0px;
	font-family: 'Maven Pro', sans-serif;
  display:flex;
  justify-content:center;
  background:#B9BBBC;
}
article{
  align-self:center;
	min-height: 700px;
	height: 650px;
	width:425px;
  background:#52515B;
  box-shadow: 15px 38px 34px -26px hsla(0,0%,0%,.2);
  text-shadow: 2px 6px 7px #EAEAE3;
  border-radius:5px;
  & header{
    position: absolute;
    width: 100%;
    height: 52px;
    top: 0px;
    background-color: #52515B;
    border-top-left-radius:5px;
    border-top-right-radius:5px;
    & label{
      position: relative;
      display:  inline-block;
      width: 30px;
      height: 8px;
      margin: 20px 25px;
      display: block;
      background:#B9BBBC;
      cursor:pointer;
      &:hover{
        background-color: #E1E1E0;
      }
    }
  }
   & #content{
    width:425px;
    height:650px;
    position: relative;
    transform: translate3d(0px,0,0);
    transition: transform 0.5s ease-in-out;
    z-index: 10;
    border-top-left-radius:10px;
    border-top-right-radius:10px;
  }
  & h1{
    height: 140px;
    width: 100%;
    font-family: 'Maven Pro', sans-serif;
    font-size: 40px;
    padding-left: 20px;
    box-sizing: border-box;
    font-weight: normal;
    color: #777;
  }
  #container{
    position: absolute;
    height:650px;
    overflow-x: hidden;
      & section#content{
      height: 100%;
      padding-top: 52px;
      background-color: #FDFDFD;
      box-sizing: border-box;
      & #body{
        height: 100%;
        padding: 1rem;	
        color: #aaa;
        box-sizing: border-box;
        overflow-y: auto;
      }
    }
  }
}

#menu_wrap,
#alt_menu{
	position: absolute;
	height:650px;
	width: 200px;
	top: 0px;
	margin-left: -200px;
	background-color: #52515B;
	transition: transform 0.5s ease-in-out;
  border-top-left-radius:10px;
}
#open{
	display: none;
  &:checked~article #menu_wrap{
	  transform: translate3d(200px,0,0);
    border-top-left-radius:10px;
  }
  &:checked~article header>label{
	  background-color: #E1E1E0;
  }
  &:checked~article #content{
    transform: translate3d(200px,0,0);
    border-top-left-radius:10px;
    border-top-right-radius:10px; 
  }
  &:checked~article #alt_menu{
    top: -100%;
    transition: top 0s ease-in-out 0.5s;
  }
  &:checked+article #alt_menu_right{
    transform: translate3d(200px,0,0);
    z-index: 100;
  }
  &:checked+article #alt_menu_left>.alt_menu_inner{
	transform: perspective(800) rotateY(0deg);
  }
  &:checked+article #alt_menu_right>.alt_menu_inner{
    transform: perspective(800) rotateY(0deg);
  }
  &:checked+article .alt_menu_inner>div:after{
    background-color: transparent;
  }
}
.txt {
  height: 100px;
  margin-top: 12.5px;
  margin-bottom: 12.5px;
  &:nth-of-type(2) {
    margin-top: 10px;
  }
  & .img {
    float: left;
    height: 60%;
    width: 20%;
    margin-left: 20px;
    border-radius: 4px;
    background: #B9BBBC;
  }
  & span {
    float: left;
    background: #E1E1E0;
    height: 10px;
    width: 55%;
    margin-left: 150px;
    margin-top: -60px;
    position: relative;
    border-radius: 3px;
    &:nth-of-type(2) {
      margin-top: -35px;
    }
    &:nth-of-type(3) {
      margin-top: -10px;
      width: 25%;
    }
  }
}

#alt_menu{
	position: absolute;
	width: 200px;
	height: 100%;
	top: 0%;
	left: 0px;
	margin-left: 0px;
	background-color: #595959;
	z-index: 10;
	transition: top 0s ease-in-out;
  border-top-left-radius:10px;
}

.alt_menus{
	position: absolute;
	width: 100%;
	height: 100%;
	transition: all 0.5s ease-in-out;
  & .alt_menu_inner{
    position: absolute;
    width: 100px;
    height: 100%;
    transition: all 0.5s ease-in-out;
    transform-origin: left center;
  }
}

#alt_menu_right>.alt_menu_inner{
	left: -100px;
	overflow: hidden;
	transform-origin: right center;
  transform: perspective(800) rotateY(-90deg) scale(0.55, 1);
}
.alt_menu_inner>div{
	position: absolute;
	width: 200px;
	height: 100%;
	background-color: #52515B;
}
#alt_menu_right>.alt_menu_inner>div{
	right: 0;
  &:after{
	  background-color: hsla(255,255%,255%,0.6);
  }
}
#alt_menu_left>.alt_menu_inner{
	transform: perspective(800) rotateY(90deg) scale(0.57, 1);
	z-index: 10;
}
#alt_menu_left>.alt_menu_inner>div:after{
	background-color: hsla(0,0%,0%,0.6);
}

.alt_menu_inner>div:after{
	position: absolute;
	height: 100%;
	width: 100%;
	left: 0px;
	top: 0px;
	content: "";
	background-color: transparent;
	transition: all 0.5s ease-in-out;
}

menu{
	list-style: none;
	width: 200px;
	padding: 0 12px;
	margin: 0px;
	box-sizing: border-box;
  border-top-left-radius:10px;
  & li{
    position: relative;
    width: 100%;
    height: 52px;
    margin-bottom: 1px;
    padding: 0 8px;
    line-height: 52px;
    font-size: 16px;
    box-sizing: border-box;
    & label{
      display: block;
      height: 100%;
      width: 100%;
    }
    &:after{
      position: absolute;
      display: block;
      height: 8px;
      width: 160px;
      content: "";
      background-color:#B9BBBC;
      border-radius:2px;
    }
    &:first-child{
      height: 120px;
      padding: 0;
    }
    &:first-child:after,
    &:last-child:after{
      display: none;
    }
  }
  & span{
    padding:1rem;
  }
}
.icon, .icon2{
  margin-left: 20px;
  border-radius: 4px;
	height: 80px;
	width: 90px;
	background-color: #B9BBBC;
	margin: 50px 42px 0;
}
.icon2{
   margin:52px 28px 0;
   width:110px;
}
              
            
!

JS

              
                
              
            
!
999px

Console