JSFiddle - React, Tailwind, and code Playground
by Alhasan Abd
HTML
<nav class="nav-roundslide">
<a class="next" href="">
<h3>Bla Bla Bla Bla</h3>
</a>
</nav>
CSS
nav.nav-roundslide{
position: absolute;
top: 30%;
right: 0;
z-index: 1000;
}
nav a { display: block;
outline: none;
text-align: left;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);}
nav a.next {
}
/*--------------------*/
/* Rounded slide */
/*--------------------*/
.nav-roundslide a {
margin: 0 20px;
padding: 15px;
width: 62px;
height: 62px;
border-radius: 40px;
background: #0D2038;
-webkit-transition: width 0.3s, background-color 0.3s;
transition: width 0.3s, background-color 0.3s;
}
.nav-roundslide h3 {
position: absolute;
top: 0;
margin: 0;
color: #566473;
text-transform: uppercase;
white-space: nowrap;
letter-spacing: 1px;
font-weight: 400;
font-size: 0.85em;
line-height: 4.45;
opacity: 0;
-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
transition: opacity 0.3s, transform 0.3s;
}
.nav-roundslide a.button h3 {
right: 20px;
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
.nav-roundslide a.next h3 {
left: 20px;
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
.nav-roundslide a:hover {
width: 300px;
background: #0D2038;
height: 510px;
}
.nav-roundslide a:hover h3 {
opacity: 1;
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
-webkit-transform: translateX(0);
transform: translateX(0);
}
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }