<ul class="snip1284">
  <li class="current"><a href="#">Home</a></li>
  <li><a href="#">About Us</a></li>
  <li><a href="#">Blog</a></li>
  <li><a href="#">Services</a></li>
  <li><a href="#">Products</a></li>
  <li><a href="#">Contact</a></li>
</ul>
@import url(https://fonts.googleapis.com/css?family=Raleway:500);
.snip1284 {
  font-family: 'Raleway', Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 1px;
}
.snip1284 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}
.snip1284 li {
  display: inline-block;
  list-style: outside none none;
  margin: 0.5em 1.2em;
  padding: 0;
}
.snip1284 a {
  padding: 0 0.6em;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  text-decoration: none;
}
.snip1284 a:before,
.snip1284 a:after {
  width: 3px;
  height: 0;
  position: absolute;
  content: '';
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
  background-color: #1abc9c;
}
.snip1284 a:before {
  top: 0;
  right: 0;
}
.snip1284 a:after {
  bottom: 0;
  left: 0;
}
.snip1284 a:hover,
.snip1284 .current a {
  color: #ffffff;
}
.snip1284 a:hover:before,
.snip1284 .current a:before,
.snip1284 a:hover:after,
.snip1284 .current a:after {
  height: 100%;
}
/* Demo purposes only */
body {
  background-color: #212121;
}
  /* Demo purposes only */
  $(".hover").mouseleave(
    function () {
      $(this).removeClass("hover");
    }
  );
Run Pen

External CSS

  1. https://www.littlesnippets.net/css/codepen-result.css

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js