Skip to content

Instantly share code, notes, and snippets.

@SindhujaD
Created January 6, 2014 00:12
Show Gist options
  • Select an option

  • Save SindhujaD/8276047 to your computer and use it in GitHub Desktop.

Select an option

Save SindhujaD/8276047 to your computer and use it in GitHub Desktop.
A Pen by Jesse Shawl.
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
@import "compass";
*{
box-sizing:border-box;
}
nav {
background: #005B63;
}
ul{
margin:0;
padding:0;
list-style:none;
&:after{
content:' ';
display:table;
clear:both;
}
}
li {
display:block;
float:left;
width:25%;
text-align:center;
position:relative;
}
@for $i from 1 through 4{
li:nth-child(#{$i}){
background:lighten(#005B63, $i*3%);
&:after{
content:'';
z-index:1;
transition:border-width .2s ease;
display:block;
position:absolute;
margin-left:-20px;
left:100%;
height:0;
width:0;
border-width:76px 0px 0 40px;
border-color:lighten(#005B63, ($i+1)*3%) lighten(#005B63, $i*3%);
border-style:solid;
top:0;
}
}
}
li:last-child{
&:after{
display:none;
}
}
a{
color:#fff;
display:block;
padding:1em 0;
text-decoration:none;
font-weight:bold;
font-size:1.5em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment