cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <link href='https://fonts.googleapis.com/css?family=Dosis:600' rel='stylesheet' type='text/css'>
<div class="nav-container">
<nav class="main">
  <ul>
    <li class="trains"><img src="https://dl.dropboxusercontent.com/u/1143870/icons/train_white.svg"><a href="#" class="label">Trains</a></li>
    <li class="planes"><img src="https://dl.dropboxusercontent.com/u/1143870/icons/plane_white.svg"/><a href="#" class="label">Planes</a></li>
    <li class="rockets"><img src="https://dl.dropboxusercontent.com/u/1143870/icons/rocket_white.svg"><a href="#" class="label">Rockets</a></li>
  </ul>
</nav>
<section class="sub">
  <div class="content train">
  <img src="https://dl.dropboxusercontent.com/u/1143870/icons/train_white.svg" class="large">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque iaculis.</p>
     <ul>
      <li><a href="#">Train Details</a></li>
      <li><a href="#">More Train Details</a></li>
    </ul>
  </div>
  
   <div class="content plane">
  <img src="https://dl.dropboxusercontent.com/u/1143870/icons/plane_white.svg" class="large">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque iaculis.</p>
     <ul>
      <li><a href="#">Plane Details</a></li>
      <li><a href="#">More Plane Details</a></li>
    </ul>
  </div>  
  
   <div class="content rocket">
  <img src="https://dl.dropboxusercontent.com/u/1143870/icons/rocket_white.svg" class="large">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque iaculis.</p>
     <ul>
      <li><a href="#">Rockets Details</a></li>
      <li><a href="#">More Rocket Details</a></li>
    </ul>
  </div>  
</section>
</div>


            
          
!
            
              $easeOutSine:cubic-bezier(0.390, 0.575, 0.565, 1.000);
 $easeInOutSine:cubic-bezier(0.445, 0.050, 0.550, 0.950); 

body { 
  background: #B7C9E5;
  color:#F4F4F4;
  font-family: 'Dosis', Helvetica, Arial, sans-serif;
  font-weight:600;  
}

ul {
  list-style:none;
  margin:0;
  padding:0;
} 

a {color: #419FE8;} 
a:hover {color: #A6365A;}

nav.main ul {
  font-size:1.1rem;
  
  li {
    position:relative;
    text-transform: uppercase;
    padding:16px 0 16px 20px;
    margin:0;
    display:block;
    height:20px;
    border-bottom: 1px solid rgba(252,252,252,0.4);
    transition: all .2s $easeOutSine;
    
    &:hover {
      background:#49505B;
      cursor: pointer;
    }
    
    img {
      position: abosolute;
      top:0;
      left:0;
    }
    
    a.label {
      position: absolute;
      top: 16px;
      left: 54px;
      text-decoration:none;
      color: #f4f4f4; 
     }
  }
}

.nav-container {
  position:fixed;
  width:350px;
  height:100%;
  top:0;
  left:0;

}
.main {
  width:300px;
  background-color:#141619;
  color:#FCFCFC;
  height:100%;
  min-height:500px;
  position:fixed;
  top:0;
  left:0;
  z-index:1000;
  overflow:hidden;
  transition: width .35s $easeInOutSine;
}


.main li a {
  transition: opacity .2s .15s $easeOutSine;
}

.main:hover li a {
  transition: opacity .2s $easeOutSine;
}


.sub {
  position:fixed;
  top:0;
  left:0;
  width:170px;
  height:100%;
  min-height:500px;
  background-color:#49505B;
  padding: 2em 20px 0 100px;
  
  img.large {
    width: 100px;
    display: block;
    margin: 0 0 2em 25px;
   }
 }
.content {
  position: absolute;
  width:170px;

}

.rocket, .train, .plane {visibility:hidden;}
.sub .active {visibility:visible;}
.main .active {background:#49505B;}
            
          
!
            
              
$( ".nav-container" ).mousemove(function( event ) {
  if (event.pageX < 290) {
   $('.main').css("width", "60px");
   $('.main li a').css("opacity", "0");
    
  } else if (event.pageX >=290) {
     $('.main').css("width", "300px");
    $('.main li a').css("opacity", "1");
    
      $('.main li').each(function() {
        $(this).removeClass('active');  
     });
  }; 
});

$('.main li').on('mouseover', function(e) {
 
  if ($('.trains').is(":hover") ) {      
       $('.train').addClass('active');
      $('.trains').addClass('active');
  } else {
        $('.train').removeClass('active');
      $('.trains').removeClass('active');
  }
  
  if ($('.planes').is(":hover") ) {
       $('.plane').addClass('active');
      $('.planes').addClass('active');
  } else {
        $('.plane').removeClass('active');
      $('.planes').removeClass('active');
  }
 
  if ($('.rockets').is(":hover") ) {
       $('.rocket').addClass('active');
      $('.rockets').addClass('active');
  } else {
      $('.rocket').removeClass('active');
      $('.rockets').removeClass('active');
  }  
 });


            
          
!
999px
Loading ..................

Console