JSFiddle - React, Tailwind, and code Playground
HTML
<div class="top_l">
<li>Nav <span>▼</span>
<ul> <a href="#">Title</a>
<a href="#">Title</a>
<a href="#">Title</a>
</ul>
</li>
</div>
CSS
.top_l {
width: 340px;
height: 60px;
float: left;
}
.top_l li {
height: 32px;
padding: 8px 12px 0 12px;
margin: 10px 0 0 6px;
border: 1px solid transparent;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
float: left;
-moz-transition: all .3s ease;
-webkit-transition: all .3s ease;
-ms-transition: all .3s ease;
transition: all .3s ease;
list-style: none;
color: #A4A4A4;
font: 20px Arial, Helvetica, sans-serif;
font-weight: bold;
font-variant: small-caps;
text-shadow: 2px 2px 3px #000;
position: relative;
cursor: pointer;
}
.top_l li span {
font: 14px Arial, Helvetica, sans-serif;
}
.top_l li:hover, .top_l li.active {
color: #FFF;
border: 1px solid #444;
}
.top_l li ul {
width: 120px;
height: 120px;
background: #222;
border: 1px solid #444;
-moz-box-shadow: inset 0 0.1em 0.4em 0.1em #000;
-webkit-box-shadow: inset 0 0.1em 0.4em 0.1em #000;
box-shadow: inset 0 0.1em 0.4em 0.1em #000;
display: none;
position: absolute;
top: 22px;
left: 4px;
}
.top_l li ul a {
width: 118px;
height: 28px;
padding: 10px 0 0 0;
background: red;
float: left;
color: #FFF;
font: 14px Arial, Helvetica, sans-serif;
font-weight: bold;
font-variant: small-caps;
text-shadow: 1px 1px 1px #000, -2px -2px 2px #000;
}
JavaScript
$(document).ready(function () {
$('.top_l li').click(function () {
$('.top_l li').addClass('active');
$('.top_l li ul').slideToggle();
});
});