JSFiddle - React, Tailwind, and code Playground
by harmeet_jaipur
September 05, 2012
HTML
<div id="intro-wrap">
<h1 class="main-header">Here is a Title</h1>
<p class="main-desc">You can write whatever you want about yourself here. You can say you're a superhuman alien ant, arrived from the nether regions of Dwarf-Ant-Dom.</p>
</div>
<div class="open-intro">+</div>
<div class="close-intro">-</div>
CSS
#intro-wrap {
background: rgba(0,0,0,.8);
position: absolute;
top: 10%;
left: 0px;
z-index: 1;
padding: 15px 40px 25px 30px;
border-left: 25px solid rgba(0,0,0,.2);
}
#intro-wrap h1 {
font-family: "PT Sans Narrow";
font-size: 25px;
color: #fff;
font-weight: 700;
margin-bottom: 0px !important;
padding-bottom: 10px;
}
#intro-wrap p {
width: 300px;
line-height: 19px;
color: #999;
}
.open-intro {
display: none;
position: absolute;
top:30px;
left:410px;
cursor: pointer;
width: 25px;
height: 25px;
z-index: 50;
padding-left:15px;
background: yellow
}
.close-intro {
display: block;
position: absolute;
top: 30px;
left:410px;
cursor: pointer;
width: 25px;
height: 25px;
z-index: 50;
padding-left:15px;
background: red;
}
JavaScript
$('.open-intro').click(function() {
$('#intro-wrap').slideDown();
$('.close-intro').show();
$('.open-intro').hide();
});
$('.close-intro').click(function() {
$('#intro-wrap').slideUp();
$('.open-intro').show();
$('.close-intro').hide();
});