JSFiddle - React, Tailwind, and code Playground

by erick

HTML

<figure class="illustration">
    <a href="#">
        <img src="http://d3pr5r64n04s3o.cloudfront.net/tuts/383_data_uri/preview.png" alt="" />

        <dl>
            <div class="one">
                <dt>Client</dt>
                    <dd>Envato</dd>
            </div>
            <div class="two">        
                <dt>Role</dt>
                    <dd>Illustration</dd>    
            </div>
        </dl>
    </a>    
</figure>    
<figure class="illustration">
    <a href="#">
        <img src="http://d3pr5r64n04s3o.cloudfront.net/articles/103_ux_session/ux-foundations.png" alt="" />

        <dl>
            <div class="one">
                <dt>Client</dt>
                    <dd>Envato</dd>
            </div>
            <div class="two">        
                <dt>Role</dt>
                    <dd>Illustration</dd>    
            </div>
        </dl>
    </a>    
</figure>    
<figure class="illustration">
    <a href="#">
        <img src="http://tutsplus.s3.amazonaws.com/bestof/bestoftuts.jpg" alt="" />

        <dl>
            <div class="one">
                <dt>Client</dt>
                    <dd>Envato</dd>
            </div>
            <div class="two">        
                <dt>Role</dt>
                    <dd>Illustration</dd>    
            </div>
        </dl>
    </a>    
</figure>     WebRep
Overall rating
This site has no rating
(not enough votes)

CSS

@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300);
@import url(http://fonts.googleapis.com/css?family=PT+Sans+Narrow);

figure {
    float: left;
    margin: 20px;
    width: 200px;
    height: 200px;
    background: #9d2e2c;
    font-family: 'Open Sans';
    line-height: 200px;
    -webkit-filter: sepia(0.4);
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);    
    transition: 0.6s;
    -webkit-transition: 0.6s;
    -moz-transition: 0.6s;
    -o-transition: 0.6s;
    -ms-transition: 0.6s;
}

figure a img {
    height: 100%;
    width: 100%;
}

figure dl {
    opacity: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    padding: 20px;
    margin: 0;
    line-height: 2.5; 
    color: white;
    transition: 0.6s;
    -webkit-transition: 0.6s;
    -moz-transition: 0.6s;
    -o-transition: 0.6s;
    -ms-transition: 0.6s;
}

figure:hover dl {
    opacity: 1;
}

figure dl dt {
    text-transform: uppercase;
    font-family: 'PT Sans Narrow';
    font-size: 12px;
    margin-bottom: -16px;
}

figure dl dd {
    margin-left: 0;
}

dl div {
    padding: 10px;
    width: 180px;
    opacity: 0;
    right: 0;
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    transition: 0.6s;
    -webkit-transition: 0.6s;
    -moz-transition: 0.6s;
    -o-transition: 0.6s;
    -ms-transition: 0.6s;
}

.one {
    right: 200px;
}

.two {
    top: 100px;
    left: 200px;
}

figure:hover {
    -webkit-filter: grayscale(0.6);
}

figure:hover .one {
    right: 0px;
    opacity: 1;
}

figure:hover .two {
    left: 0px;
    opacity: 1;
}
 WebRep
Overall rating
This site has no rating
(not enough votes)

JavaScript

WebRep
Overall rating
This site has no rating
(not enough votes)