JSFiddle - React, Tailwind, and code Playground

by Justin Young

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 class="close-intro">-</div>

</div>

CSS

#intro-wrap {
    background: rgba(0,0,0,.8);
    position: absolute;
    top: 40%;
    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: block;
    position: absolute;
    top:0px;
    left:370px;
    cursor: pointer;
    width: 25px;
    height: 25px;
    z-index: 50;
  padding-left:15px;
        background: yellow 
}
.close-intro {
    display: block;
    position: absolute;
    top: 0px;
    left:370px;
    cursor: pointer;
    width: 25px;
    height: 25px;
    z-index: 50;
   padding-left:15px;
        background: red; 
}

JavaScript

$('.close-intro').click(function() {
        $('#intro-wrap').show('slide', {
            direction: 'left'
        }, 200);
    });