JSFiddle - React, Tailwind, and code Playground
HTML
<div style="margin: 0px 0px 10px 0px;">
<div class="boxbordername">
<a href="">
<div class="fourmainbanners" style="background-image: url(http://vibormoi.ru/images/stories/dom/krovat/napolnitel-podushka.jpg);"></div>
</a>
<a class="caption" href=""><strong>Подушки</strong>
<span>Очень удобные</span></a>
</div>
</div>
CSS
a .fourmainbanners{
background-size: 97%;
background-position: center;
width: 265px;
height: 155px;
background-repeat: no-repeat;
-webkit-transform: rotate(0deg) scale(1);
-moz-transform: rotate(0deg) scale(1);
-o-transform: rotate(0deg) scale(1);
-ms-transform: rotate(0deg) scale(1);
transform: rotate(0deg) scale(1);
-webkit-transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
-o-transition: all 0.25s ease;
transition: all 0.25s ease;
margin-top: -15px;
margin-left: -5px;
}
a .fourmainbanners:hover{
-webkit-transform: rotate(-5deg) scale(1);
-moz-transform: rotate(5deg) scale(1);
-o-transform: rotate(5deg) scale(1);
-ms-transform: rotate(5deg) scale(1);
transform: rotate(5deg) scale(1);
filter: alpha(opacity=100);
background-size: 110%;
overflow: hidden;
background-position: center;
margin-top: -15px;
margin-left: -5px;
}
.boxbordername:hover > .caption strong{
margin-left: 15px;
color: #3498DB;
text-shadow: 1px 1px 1px #fff;
}
.boxbordername:hover > .caption span{
color: #fff;
}
div .caption {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: #CCCCCC;
padding: 10px 0px 20px 10px;
display: block;
text-transform: uppercase;
font-family: sans-serif;
text-decoration:none;
}
div .caption span, div .caption strong, div .caption:before {
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
div .caption strong {
font-weight: normal;
font-size: 20px;
line-height: 28px;
display: block;
color: #333;
letter-spacing: 0px;
}
div > a.caption > strong:hover {
margin-left: 15px;
color: #3498DB;
text-shadow: 1px 1px 1px #fff;
}
div .caption span {
color: #666;
font-size: 12px;
line-height: 14px;
display: block;
}
div .caption:after {
height: 11px;
width: 100%;
position: absolute;
bottom: 0;
content: "";
left: 0;
right: 0;
background: #3498DB;
}
div:hover div.caption:before...