JSFiddle - React, Tailwind, and code Playground
by Michel Penke
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<input type="checkbox" id="menuToggle">
<label for="menuToggle" class="menu-icon"><i class="fa fa-share-alt"></i></label>
<div class="twitter"><i class="fa fa-twitter"></i></div>
<div class="facebook"><i class="fa fa-facebook"></i></div>
<div class="google"><i class="fa fa-rss"></i></div>
<div class="youtube"><i class="fa fa-envelope-o"></i></div>
CSS
li {
list-style-type: none;
}
nav {
width: 100%;
text-align: center;
}
nav li {}
nav ul {}
nav a {
padding: 10px;
background: #E5DAC0;
border-radius: 50%;
display: block;
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
margin: 10px 5px;
box-shadow: 0 1px #999;
}
nav a:hover {
background: #17A5B5;
border-radius: 50%;
}
/*----------------------------------------------------*/
.menu-icon {
width: 40px;
height: 40px;
display: block;
text-align: center;
line-height: 40px;
padding: 5px;
cursor: pointer;
font-size: 30px;
color: #FFF;
border: 2px dotted #FFF;
border-radius: 50%;
background: #193145;
float: left;
}
.menu {
width: 50px;
height: 210px;
border: 1px #DCCEAC;
border-radius: 5px;
margin: 50px auto;
background: #E1D5B8;
position: absolute;
top: -280px;
opacity: 0;
z-index: -1;
transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
-ms-transition: all .4s ease-in-out;
-o-transition: all .4s ease-in-out;
-webkit-transition: all .4s ease-in-out;
}
/*------------------------------------------------------------------------*/
#menuToggle {
display: none;
}
#menuToggle:checked ~ .facebook {
position: absolute;
top: 3px;
left: 80px;
opacity: 1;
}
#menuToggle:checked ~ .twitter {
position: absolute;
top: 45px;
left: 78px;
opacity: 1;
}
#menuToggle:checked ~ .google {
position: absolute;
top: 80px;
left: 5px;
opacity: 1;
}
#menuToggle:checked ~ .youtube {
position: absolute;
top: 75px;
left: 48px;
opacity: 1;
}
/*------------------------------------------------------------------------*/
.facebook {
width: 30px;
height: 30px;
display: block;
position: absolute;
top: 6px;
left: 6px;
background: #1C59BA;
text-align: center;
line-height: 40px;
border-radius: 50%;
border: 5px solid #EEE;
cursor: pointer;
z-index: -1;
opacity: 0;
transition: all .3s ease-in-out;
-moz-transition:...