Skip to content

Instantly share code, notes, and snippets.

@MoOx
Created February 27, 2012 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MoOx/1925629 to your computer and use it in GitHub Desktop.
Save MoOx/1925629 to your computer and use it in GitHub Desktop.
dropdown with an after for maintaining the hover when you mouse around
/* dropdown with an after for maintaining the hover when you mouse around */
ul
{
display: none
}
nav:hover ul
{
position: relative;
display: block;
outline: 1px solid blue;
}
nav:hover ul::before
{
outline: 1px solid red;
display: block;
position: absolute;
content:"";
top: 0;
left: 0;
width: 300%;
height: 300%;
margin-left: -100%;
margin-top: -100%;
}
<nav>
Dropdown
<ul>
<li>item</li>
</ul>
</nav>
{"view":"split","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment