Skip to content

Instantly share code, notes, and snippets.

@popcorn245
Created July 8, 2015 19:19
Show Gist options
  • Save popcorn245/760f630e699347dce766 to your computer and use it in GitHub Desktop.
Save popcorn245/760f630e699347dce766 to your computer and use it in GitHub Desktop.
A pure CSS drop-down solution.
<style>
span p{
cursor:pointer;
}
span ul{
transition: all 0.5s ease;
list-style:none;
height:0px;
padding:0;
overflow:hidden;
opacity:0;
border:1px solid #ddd;
width:300px;
}
span ul li{
border-bottom:1px solid #ddd;
padding:10px;
}
span ul li:last-of-type{
border:none;
}
span:hover ul{
height:118px;
opacity:1;
}
</style>
<span>
<p>Dropdown with Pure CSS</p>
<ul>
<li>Take</li>
<li>That</li>
<li>Bootstrap</li>
</ul>
</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment