LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

CSS
/* vars */
@import url("http://weloveiconfonts.com/api/?family=fontawesome");
/* zocial */
[class*="fontawesome-"]:before {
  font-family: 'FontAwesome' sans-serif;
  font-size: 1.3em;
  margin-right: 0.8em;
  color: #d2d5d9;
}
/* mixin */
body {
  font-family: Arial, sans-serif;
  font-size: 0.9em;
  background-color: #f3f4f4;
}
.nav {
  color: #6d7580;
  min-width: 90px;
  max-width: 250px;
  height: 333px;
  background-color: #fff;
  border: 1px solid #d2d5d9;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
a > span {
  opacity: 1;
  transition: opacity 0.3s;
}
.nav > a {
  box-sizing: border-box;
  position: relative;
  display: block;
  padding: 1em;
  border-bottom: 1px solid #d2d5d9;
}
.nav > a:last-child {
  border-bottom: 0;
  border-radius: 0 0 4px 4px;
}
.nav > a:hover {
  background-color: #6d7580;
  color: #fff;
}
.nav > a:hover:before {
  color: #fff;
}
.nav > a:hover .bubble {
  border: 0;
  background: #f00;
  color: #fff;
}
.nav > a:hover::after {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #6d7580;
  content: '';
  display: block;
  position: absolute;
  right: -8px;
  top: 1.1em;
}
a.active {
  background-color: #6d7580;
  color: #fff;
}
a.active:before {
  color: #fff;
}
a.active .bubble {
  border: 0;
  background: #f00;
  color: #fff;
}
a.active::after {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #6d7580;
  content: '';
  display: block;
  position: absolute;
  right: -8px;
  top: 1.1em;
}
.nav > .title {
  box-sizing: border-box;
  position: relative;
  display: block;
  padding: 1em;
  background-color: #4a4f56;
  color: #fff;
  font-weight: 500;
  border-radius: 4px 4px 0 0;
}
.bubble {
  position: absolute;
  top: 1.3em;
  right: 1em;
  font-size: 0.8em;
  color: #6d7580;
  border: 1px solid #6d7580;
  border-radius: 10px;
  padding: 2px 5px;
}
/* responsiveness */
@media (max-width: 180px) {
  .title > span {
    display: none;
  }
  .nav > a > span {
    opacity: 0;
    transition: opacity 0.3s;
  }
}
JS
/* 
Responsive Menu
Inspired by http://dribbble.com/shots/450349-Responsive-menu

Resize the window!
*/
Host Instantly Drag and Drop Website Builder

 

Description

Testing out Slim + Stylus while creating a responsive menu.
Term
Mon, 11/27/2017 - 21:52

Related Codes

Pen ID
Pen ID
Pen ID