JSFiddle - React, Tailwind, and code Playground

by Ngoc Hieu

HTML

<div id="effect7" class="image">
        <img src="http://4.bp.blogspot.com/-5tVqAwUPb8M/UtFlQ-PYRWI/AAAAAAAAAEI/gx83sLCtN_4/s1600/effect-7.jpg" />
        <div class="detail">
            <h1 class="title">Hiệu ứng 7</h1>
            <p>Chúng ta vẫn biết rằng, làm việc với một đoạn văn bản dễ đọc và rõ nghĩa dễ gây rối trí</p>
            <a href="#">Xem tiếp</a>
        </div>
    </div>

CSS

.image{
        width: 360px;
        float: left;
        margin: 10px;
        position: relative;
        overflow: hidden;
        height: 240px;
    }
    .image img{
        width: 100%;
    }
    h1.title{
        text-transform: uppercase;
        font-size: 25px;
        font-weight: bold;
        line-height: 25px;
        padding: 10px;
        position: relative;
    }   
    .detail{
        position: absolute;
        width: 100%;
        height: 100%;
        top:0;
        left: 0;
        text-align: center;
    }
    p{
        color: #fff;
        padding: 10px;
    }
    a{
        text-decoration: none;
        display: inline-block;
        padding: 10px 15px;
        border-radius: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border: 1px solid #111;
    }
    .mask{
        position: absolute;
        width: 100%;
        height: 100%;
        top:0;
        left: 0;
        bottom: 0;
        right: 0;
    }

#effect7 img{
        transition: all 0.8s;
        -moz-transition: all 0.8s;
        -webkit-transition: all 0.8s;
    }
    #effect7 .detail{
        background:rgba(238,220,130,0.7);
        transform: translateY(-100%);
        -moz-transform: translateY(-100%);
        -webkit-transform: translateY(-100%);
        transition: all 0.4s;
        -moz-transition: all 0.4s;
        -webkit-transition: all 0.4s;
        transition-delay: 0.6s;
        -moz-transition-delay: 0.6s;
        -webkit-transition-delay: 0.6s;
    }
    #effect7 .title{
        background:rgba(255,255,255,0.7);
        position: relative;
        transform:translateX(-100%);
        -moz-transform:translateX(-100%);
        -webkit-transform:translateX(-100%);
        transition: all 0.6s;
        -moz-transition: all 0.6s;
        -webkit-transition: all 0.6s;
        transition-delay:1s;
        -moz-transition-delay:1s;
        -webkit-transition-delay:1s;
    }
    #effect7 p{
        color:#111;
       ...