<h1>CSS3 Menu</h1>

<nav>
  <ul>
    <li><a href="#">Home</a></li>
    <li>
      <a href="#">About</a>
      <ul class="submenu">
        <li><a href="#">About 1</a></li>
        <li><a href="#">About 2</a></li>
        <li><a href="#">About 3</a></li>
      </ul>
    </li>
    <li><a href="#">Blog</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
</nav>
body {
  font-family: calibri, arial;
  font-size: 18px;
  margin-top: 60px;
}

ul {
  text-align: center;
  li {
    display:inline-block;
    margin-right: 15px;
    transition:all 0.3s ease-in-out;
    &:hover {
      .submenu {
        height: 85px;
      }
      a {        
        color: #3862a0;
        &::before {
          visibility: visible;
          transform: scale(1, 1);
        }
      }
    }
    .submenu {
      overflow:hidden;
      position:absolute;
      left: 0;
      width: 100%;
      background-color: #3862a0;
      height: 0;
      line-height: 40px;
      box-sizing:border-box;
      transition:height 0.3s ease-in-out;
      transition-delay: 0.1s;
      a {
        color: #fff;
        margin-top: 20px;
        font-size: 16px;
        &:hover {
          color: #fff;
          text-decoration:underline;
        }
      }
    }
    a {
      color: #999;
      display: block;
      padding: 0 7px 0 7px;
      margin: 0 0 10px;
      text-decoration: none;
      position: relative;
      &::before {
        content: "";
        position: absolute;
        width: 100%;
        height: 3px;
        bottom: -10px;
        left: 0px;
        background-color: #3862a0;
        transition: all 0.2s ease-in-out;
        transform: scale(0, 0);
        visibility: hidden;
      }
    }
  }
}

/*-------Some fancy styling-------*/
h1 {
  text-align:center;
  font-family: satisfy;
  font-weight: 300;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.