JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="button">Hover</div>
<div class="box">
Sliding down!
</div>
</div>
CSS
body {
background: #222;
}
.container{
margin: 50px auto 0 auto;
position:relative;
height: 210px;
width: 180px;
overflow: hidden;
}
.box {
position:absolute;
top:-180px;
left:0px;
width: 160px;
height: 160px;
line-height: 7em;
font-size: 1.5em;
display: block;
background: #2A363B;
text-align: center;
color: white;
border: 4px solid #fff;
border-radius: 90px;
-webkit-border-radius: 90px;
-moz-border-radius: 90px;
z-index: -10;
}
.button {
position: relative;
width: 150px;
padding: 10px;
background: #2A363B;
color: white;
text-align: center;
display: block;
z-index: 10;
}
JavaScript
//$('.box').hide();
$('.button').hover(
function() {
$('.box').animate({top:40}, 800);
}, function(){
$('.box').animate({top:-180}, 800);
}
);