Skip to content

Instantly share code, notes, and snippets.

@cedricici
Created February 2, 2012 21:22
Show Gist options
  • Save cedricici/1725858 to your computer and use it in GitHub Desktop.
Save cedricici/1725858 to your computer and use it in GitHub Desktop.
transitionned menu
/**
* transitionned menu
*/
html{
background: linear-gradient(-45deg, white, gray);
min-height:100%;
font-family:sans;
font-size:.9em;
}
ul {
margin-top:55px;
list-style-type:none;
width:150px;
margin-left:-15px;
padding:0;
}
ul li{
margin:5px 0;
padding:0;
}
li a{
display:block;
text-align:right;
text-decoration:none;
color:#000;
text-shadow:0px 1px 0px rgba(255,255,255,0.5);
background:linear-gradient(73deg,#aaa,#888);
box-shadow:3px 4px 5px rgba(0,0,0,.5);
padding:3px 8px;
border-bottom-right-radius:8px;
margin-right:50px;
transition:all .7s;
}
li a:hover{
padding:12px 18px 12px 8px;
margin-right:0px;
color:#fff;
}
li a:target {
margin-right:0;
color:#fff;
background:#000;
}
<!-- content to be placed inside <body>…</body> -->
<section>
<ul>
<li><a id="css" href="#css" >CSS</a></li>
<li><a id="html" href="#html" >HTML</a></li>
<li><a id="js" href="#js" >JAVASCRIPT</a></li>
<li><a id="php" href="#php" >PHP</a></li>
</ul>
</section>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment