<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hiệu ứng hover slide image siêu đẹp - Code mẫu</title>
<style>
.mrtung-out {
max-width: 1110px;
margin: 0 auto;
display: flex;
flex-flow: row wrap;
}
.block_content {
flex: 1 1 25%;
padding: 10px;
}
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
img {
max-width: 100%;
}
.effect {
overflow: hidden;
position: relative;
-webkit-transition: all 0.35s ease;
-moz-transition: all 0.35s ease;
-ms-transition: all 0.35s ease;
-o-transition: all 0.35s ease;
transition: all 0.35s ease;
text-align: center;
}
.effect a {
display: block;
overflow: hidden;
position: relative;
}
.effect a:before {
content: "";
bottom: 0;
left: 50%;
right: 51%;
top: 0;
filter: alpha(opacity=100);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
-webkit-opacity: 1;
-moz-opacity: 1;
-ms-opacity: 1;
-o-opacity: 1;
opacity: 1;
position: absolute;
background: rgba(0,0,0,.1) none repeat scroll 0 0;
}
.effect a:after {
content: "";
bottom: 50%;
left: 0;
right: 0;
top: 50%;
filter: alpha(opacity=100);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
-webkit-opacity: 1;
-moz-opacity: 1;
-ms-opacity: 1;
-o-opacity: 1;
opacity: 1;
position: absolute;
background: rgba(0,0,0,.1) none repeat scroll 0 0;
}
.effect:hover a:before {
left: 0;
right: 0;
filter: alpha(opacity=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
-webkit-opacity: 0;
-moz-opacity: 0;
-ms-opacity: 0;
-o-opacity: 0;
opacity: 0;
-webkit-transition: all 700ms ease-in-out 0s;
-moz-transition: all 700ms ease-in-out 0s;
-ms-transition: all 700ms ease-in-out 0s;
-o-transition: all 700ms ease-in-out 0s;
transition: all 700ms ease-in-out 0s;
}
.effect:hover a:after {
bottom: 0;
top: 0;
filter: alpha(opacity=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
-webkit-opacity: 0;
-moz-opacity: 0;
-ms-opacity: 0;
-o-opacity: 0;
opacity: 0;
-webkit-transition: all 700ms ease-in-out 0s;
-moz-transition: all 700ms ease-in-out 0s;
-ms-transition: all 700ms ease-in-out 0s;
-o-transition: all 700ms ease-in-out 0s;
transition: all 700ms ease-in-out 0s;
}
</style>
</head>
<body>
<div class="mrtung-out">
<div class="block_content">
<div class=" effect">
<a href="#">
<img class="img-fluid w-100" src="https://fcwordpress.net/wp-content/uploads/2021/04/4_OnlineCourse-Alex_Crowly.jpg" alt="banner left" title="banner left">
</a>
</div>
</div>
<div class="block_content">
<div class=" effect">
<a href="#">
<img class="img-fluid w-100" src="https://fcwordpress.net/wp-content/uploads/2021/04/4_OnlineCourse-Alex_Crowly.jpg" alt="banner left" title="banner left">
</a>
</div>
</div>
<div class="block_content">
<div class=" effect">
<a href="#">
<img class="img-fluid w-100" src="https://fcwordpress.net/wp-content/uploads/2021/04/4_OnlineCourse-Alex_Crowly.jpg" alt="banner left" title="banner left">
</a>
</div>
</div>
<div class="block_content">
<div class=" effect">
<a href="#">
<img class="img-fluid w-100" src="https://fcwordpress.net/wp-content/uploads/2021/04/4_OnlineCourse-Alex_Crowly.jpg" alt="banner left" title="banner left">
</a>
</div>
</div>
</div>
</body>