JSFiddle - React, Tailwind, and code Playground
by David Nabb
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<ul class="cd-accordion-menu animated">
<li class="has-children">
<input type="checkbox" name="group-1" id="group-1" checked>
<label for="group-1">Canapes</label>
<ul>
<li class="has-children">
<input type="checkbox" name ="sub-group-1" id="sub-group-1">
<label for="sub-group-1">Savoury</label>
<ul>
<li class="has-children">
<input type="checkbox" name ="sub-group-level-3" id="sub-group-level-3">
<label for="sub-group-level-3">Meat</label>
<ul>
<li>Some details</li>
</ul>
</li>
<li class="has-children">
<input type="checkbox" name ="sub-group-level-3" id="sub-group-level-3">
<label for="sub-group-level-3">Seafood</label>
<ul>
<li>Some details</li>
</ul>
</li>
<li class="has-children">
<input type="checkbox" name ="sub-group-level-3" id="sub-group-level-3">
<label for="sub-group-level-3">Vegetarian</label>
<ul>
<li>Some details</li>
</ul>
</li>
</ul>
</li>
<li class="has-children">
<input type="checkbox" name ="sub-group-2" id="sub-group-2">
<label for="sub-group-2">Sweet</label>
<ul>
<li>Some details</li>
</ul>
</li>
</ul>
</li>
<li class="has-children">Small Plates
<ul>
<li class="has-children">Mini Bowls
<ul>
<li>Some details</li>
</ul>
</li>
<li class="has-children">Sandwiches
<ul>
<li>Some details</li>
</ul>
</li>
<li class="has-children">Tapas
<ul>
<li>Some details</li>
</ul>
</li>
</ul>
</li>
<li class="has-children">Breakfast
<ul>
<li class="has-children">Cold
<ul>
<li>Some...
CSS
li {
list-style: none;
font-family: greenteacookies;
letter-spacing: 1px;
font-weight: bold;
background: white;
color: #666;
line-height: 1.5;
cursor: pointer;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
li:hover {
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
li:active ul {
display: block;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
ul li ul {
display: none;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
ul li {
font-size: 40px;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
ul ul li {
font-size: 34px;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
ul ul ul li {
font-size: 28px;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
ul ul ul ul li {
font-size: 22px;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-ms-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}