JSFiddle - React, Tailwind, and code Playground
by Mixail
HTML
<div class="holder">
<div class="top"><label><input type="checkbox" id="remember"> Remember me</label></div>
<div class="hided-holder">
<div class="hided">hided block</div>
</div>
<a class="bottom" href="#">bottom</a>
</div>
CSS
* {
box-sizing:border-box;
}
@font-face {
font-family: 'Helevantica';
font-style: normal;
font-weight: 400;
src: local('Arimo'), url(http://themes.googleusercontent.com/static/fonts/arimo/v6/zdwT-H3HcaeqxX35_eqWUA.woff) format('woff');
}
@font-face {
font-family: 'Arimo';
font-style: normal;
font-weight: 700;
src: local('Arimo Bold'), local('Arimo-Bold'), url(http://themes.googleusercontent.com/static/fonts/arimo/v6/QBu5G2TGhi6oQGRNMl9LIvesZW2xOQ-xsNqO47m55DA.woff) format('woff');
}
body {
font:normal 14px Arimo;
color:#000;
background:#494A4E;
}
.holder {
margin:0 auto;
width: 300px;
background:#f8f6fb;
padding:25px;
border-radius:4px;
box-shadow: 0px 7px 10px 0px rgba(0, 0, 0, 0.3);
}
.top {
text-align:left;
font-weight:bold;
padding:5px;
border:1px solid #d4d2d7;
border-radius:5px;
box-shadow: inset 0px 1px 0px 0px #fffdff;
}
.holder.show-hided .top{
border-bottom-left-radius:0px;
border-bottom-right-radius:0px;
}
.hided-holder {
height:0px;
-webkit-perspective: 1000px;
-webkit-transition: height .3s cubic-bezier(0.3,.68,.5,1); /*easy-out*/
}
.holder.show-hided .hided-holder {
height: 100px;
/*-webkit-transition: height .5s cubic-bezier(0.3,.68,.5,1);*/ /*easy-out*/
/*-webkit-transition: height 1s cubic-bezier(.39,.01,.65,.85);*/ /*easy-in*/
}
.hided {
height:100px;
padding-top:40px;
text-align:center;
border:1px solid #d4d2d7;
border-top:none;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
box-shadow: inset 0px 1px 0px 0px #fffdff;
-webkit-transform-origin: 0 0;
-webkit-transform: rotateX(-90deg);
}
.holder.show-hided .hided {
-webkit-animation: animation 0.3s ease-out;
-webkit-transform: rotateX(0deg);
}
.bottom {
display:block;
background: -webkit-linear-gradient(top, #31a8ea 0%,#168be8 100%);
border:1px...
JavaScript
$(document).ready(function(){
$('#remember').on('click', function(){
var $this = $(this).parent();
var $top = $this.parent();
var $holder = $top.parent();
var $hided_holder = $holder.find('.hided-holder');
console.log($hided_holder);
$hided_holder.toggleClass('show-hided');
$holder.toggleClass('show-hided');
});
});