JSFiddle - React, Tailwind, and code Playground
HTML
<div id="effect4" class="image">
<img src="http://3.bp.blogspot.com/-iFCq1tlEyfs/UtFlPnDOX6I/AAAAAAAAADw/u71JOT2T11M/s1600/effect-4.jpg" />
<div class="detail">
<h1 class="title">Hiệu ứng 4</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;
}
#effect4 .detail{
background: rgba(0,0,0,0.8);
transform:scale(0) rotate(360deg);
transition: all 0.5s ease-in-out 0.3s;
-webkit-transition: all 0.5s ease-in-out 0.3s;
-moz-transition: all 0.5s ease-in-out 0.3s;
}
#effect4 .title{
color: #fff;
margin: 0 10px;
padding: 20px 10px;
border-bottom: 1px solid #444;
}
#effect4 a{
color:#fff;
background: rgba(0,0,0,1);
}
#effect4 img{
transition: all 0.5s ease-in-out 0.2s;
-webkit-transition: all 0.5s ease-in-out 0.2s;
-moz-transition: all 0.5s ease-in-out 0.2s;
}
#effect4:hover img{
transform: scale(0);
-webkit-transform: scale(0);
-moz-transform: scale(0);
}
#effect4:hover .detail{
transform: scale(1) rotate(1deg);
-webkit-transform: scale(1) rotate(0deg);
-moz-transform: scale(1) rotate(0deg);
}