Skip to content

Instantly share code, notes, and snippets.

Created April 3, 2013 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save anonymous/5299872 to your computer and use it in GitHub Desktop.
Save anonymous/5299872 to your computer and use it in GitHub Desktop.
Untitled
nav {
width: 100%;
float: left;
}
nav ul {
list-style: none;
padding: 0px;
margin: 0px;
}
nav li {
position: relative;
float: left;
padding: 5px;
cursor: pointer;
}
nav ul ul {
left: 0px;
opacity: 0;
transition-property: opacity, transform;
transition-duration: 100ms, 100ms;
transform: translate(0px,-10px);
transition-timing-function: ease ease;
transition-delay: 200ms;
}
nav li li {
float: none;
}
nav li:hover ul {
display: block;
transform: translate(0px,0px);
opacity: 1;
}
<!-- content to be placed inside <body>…</body> -->
<nav>
<ul>
<li>Home</li>
<li>To be expanded
<ul>
<li>Sub1</li>
<li>Sub2</li>
</ul>
</li>
<li>About</li>
</ul>
</nav>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment