JSFiddle - React, Tailwind, and code Playground
by Joe Pigott
HTML
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<div class='circle' id='navbutton'> <i class='fa fa-bars'></i>
</div>
<div id='nav'></div>
CSS
body {
margin: 0;
padding: 0;
}
.circle {
color: white;
background: #ff1919;
height: 40px;
width: 40px;
border-radius: 50%;
cursor: pointer;
transition: 0.1s
}
.circle:hover {
width: 38px;
height: 38px;
background: white;
color: #ff1919;
border: 1px solid #ff1919
}
.circle:active {
color: #d12828;
border: 1px solid #d12828;
width: 38px;
height: 38px;
background: white
}
i {
margin-top: 12px;
margin-left: 12px;
}
#nav {
width: 50px;
height: 100%;
background: red;
margin-right: 5px;
}
JavaScript
$(document).ready(function () {
$('#navbutton').click(function () {
$('.nav').toggle();
});
});