JSFiddle - React, Tailwind, and code Playground

by linmic

HTML

<div class="block">
    <img src="http://i.imgur.com/kjI5S.jpg" class="top"><div class="overlay"></div>

    <div class="popup">
        <span class="title">BLue Block&nbsp;</span>
        <span class="info">Blah Blah Blah info more info boring info I like blue and red they are nice colors =)<span class="more"><a href="/socc/glaciers">More &#187;</a></span> 
        </span>
    </div>
</div>

CSS

.block {
    width: 700px;
    height: 385px;
    display: block;
    margin: 0px;
    position: relative;
    background-repeat: no-repeat;
    overflow:hidden;
}

.title{
    height:100px;
    width:300px;
    white-space:pre-wrap;
    text-align:right;
    line-height:40px;
    font-size:28px;
    font-weight:bolder;
    z-index:2;
    position:absolute;
    bottom:-200px;
    left:-100px;
    background-color:#000;
    opacity:0.5;
    filter: alpha(opacity = 50) progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
    color:#FFF;
    -webkit-transform: rotate(-90deg); 
    -moz-transform: rotate(-90deg);    
    -o-transform: rotate(-90deg);
}

.info{
    height:200px;
    padding-right:9px;
    line-height:2;
    width:485px;
    padding-left:5px;
    text-align:left;
    white-space:pre-wrap;
    font-size:17px;
    z-index:1;
    position:absolute;
    bottom:-200px;
    /*bottom:0px;*/
    left:100px;
    background-color:#333;
    opacity:0.5;
    filter: alpha(opacity = 50);
    color:#FFF;
    
}

img{
    position:absolute;
    top:0px;
    left:0px;
}

.top{
    z-index:1;
}

.more{
    position:absolute;
    margin-bottom:30px;
    margin-right:30px;
    bottom:0px;
    right:0px;
    
}

.popup{
    height:200px;
    width:620px;
    position:absolute;
    bottom:0px;
    left:0px;
    overflow:hidden;
    background:url:('http://i.imgur.com/kjI5S.jpg');
    z-index:2;
}
.overlay { height: 200px; width: 620px; position: absolute; bottom: 0px; left: 0px; z-index: 2; }

JavaScript

//When div.popup is moused over moused over
$("div.popup").hover(
function() {
    //slides spans up
    $('span', this).animate({
        bottom: 0 + 'px'
    });
}, function() {

    //slides spans down
    $('span', this).animate({
        bottom: '-' + 200 + 'px'
    });
});