Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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

              
                <div id="mobilebody">  
<div id="mobile">
<h1>Click on middle tab</h1>
<nav id="submenu">
<ul>
 <li><div><i class="fa fa-bell"></i><span>Alarm</span></div></li>
 <li><div><i class="fa fa-camera"></i><span>Camera</span></div></li>
 <li><div><i class="fa fa-comments"></i><span>Chat</span></div></li>
 <li><div><i class="fa fa-folder-open"></i><span>Files</span></div></li>
 <li><div><i class="fa fa-search"></i><span>Search</span></div></li>
</ul> 
</nav>
<nav id="mainmenu">
<ul>
 <li><i class="fa fa-envelope-o"></i><span>Email</span></li>
 <li id="menu" class="noactive"><i class="fa fa-bars"></i><span>Menu</span></li>
 <li><i class="fa fa-group"></i><span>Contact</span></li>
</ul>
</nav>
</div>
</div> 
              
            
!

CSS

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

*
{
margin:0px;
padding:0px;
outline:none;
}

html{height:100%}
 
body{
background: #4A4A4A;
padding:10px;
font-family:'Andika', sans-serif;
color:#b8a7a7;
text-transform:uppercase;
}

h1
{
font-size:1.2em;
padding:100px 15px 25px 15px;
text-shadow:0px 0px 5px #CFCFCF;
color:#C2C2C2;
text-align:center;
}

#mobilebody
{
width: 360px;
height: 550px;
padding:50px 0px 0px 0px;
background:#fff;
border-radius:25px;
border:2px solid #dadada;
margin:0 auto;
position: relative;
}

#mobile
{
width: 320px;
height: 480px;
margin: 0 auto;
position: relative;
background:#f2f2f2;
}

#mainmenu
{
position:absolute;
bottom:0px;
left:0px;
width:100%;
}

#submenu ul li:hover i,#mainmenu li:hover i
{
text-shadow:0px 0px 10px #fff;
-webkit-transition:0.3s;
-moz-transition:0.3s;
-o-transition:0.3s;
-ms-transition:0.3s;
transition:0.3s;
}
#submenu ul li:hover span,#mainmenu li:hover span
{
text-shadow:0px 0px 10px #fff;
-webkit-transition:0.3s;
-moz-transition:0.3s;
-o-transition:0.3s;
-ms-transition:0.3s;
transition:0.3s;
}

ul
{
margin:0px;
padding:0px;
}

ul li
{
list-style-type:none;
float:left;
text-align:center;
}

ul li span
{
display:block;
font-size:0.7em;
}

#mainmenu ul li
{
padding:3% 0%;
background:#000;
width:35%;
font-size:1em;
color:#fff;
cursor:pointer;
}

#mainmenu ul li:nth-child(2)
{
width:30%;
background:#0F0F0F;
}

#submenu
{
position:absolute;
bottom:22px;
left:0px;
width:100%;
}

#submenu ul li
{
background:transparent;
font-size:1em;
color:#fff;
cursor:pointer;
position: relative;
height:30px;
width:20%;
-webkit-transform-origin: 0 0;
-webkit-transform: perspective(800px) rotateX(270deg);
-moz-transform-origin: 0 0;
-moz-transform: perspective(800px) rotateX(270deg);
-ms-transform-origin: 0 0;
-ms-transform: perspective(800px) rotateX(270deg);
-o-transform-origin: 0 0;
-o-transform: perspective(800px) rotateX(270deg);
transform-origin: 0 0;
transform: perspective(800px) rotateX(270deg);
}

#submenu ul li div
{
background: #0F0F0F;
padding: 10px 0px;
-webkit-transform:rotateX(-180deg);
-moz-transform:rotateX(-180deg);
-o-transform:rotateX(-180deg);
-ms-transform:rotateX(-180deg);
transform:rotateX(-180deg);
}

.activeli
{
-webkit-transform: perspective(800px) rotateX(180deg)!important;
-moz-transform: perspective(800px) rotateX(180deg)!important;
-ms-transform: perspective(800px) rotateX(180deg)!important;
-o-transform: perspective(800px) rotateX(180deg)!important;
transform: perspective(800px) rotateX(180deg)!important;
}

#submenu ul li div:hover{
background:#000;
-webkit-transition:1s;
-ms-transition:1s;
-moz-transition:1s;
-o-transition:1s;
transition:1s;
}

#submenu ul li:nth-child(1)
{
-webkit-transition:1s;
-moz-transition:1s;
-ms-transition:1s;
-o-transition:1s;
transition:1s;
}
#submenu ul li:nth-child(2)
{
-webkit-transition:1.2s;
-moz-transition:1.2s;
-ms-transition:1.2s;
-o-transition:1.2s;
transition:1.2s;
}
#submenu ul li:nth-child(3)
{
-webkit-transition:1.4s;
-moz-transition:1.4s;
-ms-transition:1.4s;
-o-transition:1.4s;
transition:1.4s;
}
#submenu ul li:nth-child(4)
{
-webkit-transition:1.6s;
-moz-transition:1.6s;
-ms-transition:1.6s;
-o-transition:1.6s;
transition:1.6s;
}
#submenu ul li:nth-child(5)
{
-webkit-transition:1.8s;
-moz-transition:1.8s;
-ms-transition:1.8s;
-o-transition:1.8s;
transition:1.8s;
}

#submenu ul li.activeli:nth-child(1)
{
-webkit-transition:1s;
-moz-transition:1s;
-ms-transition:1s;
-o-transition:1s;
transition:1s;
}
#submenu ul li.activeli:nth-child(2)
{
-webkit-transition:1.2s;
-moz-transition:1.2s;
-ms-transition:1.2s;
-o-transition:1.2s;
transition:1.2s;
}
#submenu ul li.activeli:nth-child(3)
{
-webkit-transition:1.4s;
-moz-transition:1.4s;
-ms-transition:1.4s;
-o-transition:1.4s;
transition:1.4s;
}
#submenu ul li.activeli:nth-child(4)
{
-webkit-transition:1.6s;
-moz-transition:1.6s;
-ms-transition:1.6s;
-o-transition:1.6s;
transition:1.6s;
}
#submenu ul li.activeli:nth-child(5
{
-webkit-transition:1.8s;
-moz-transition:1.8s;
-ms-transition:1.8s;
-o-transition:1.8s;
transition:1.8s;
}
              
            
!

JS

              
                $("#menu").click(function(){
  if($(this).attr("class") == "noactive")
  { 
    $(this).removeClass("noactive");         
    $("#submenu li").addClass("activeli");
  }
  else
  { 
    $(this).addClass("noactive");
    $("#submenu li").removeClass("activeli");
  }
  
});
              
            
!
999px

Console