"image gradient hover effect"
Bootstrap 4.1.1 Snippet by ALIMUL AL RAZY

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<section class="image-effect">
<div class="row">
<div class="col-md-6">
<div class="img-content">
<img src="https://placeimg.com/640/480/any">
<div class="overlay">
<div class="text">Hello World</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="img-content">
<img src="https://placeimg.com/640/480/any">
<div class="overlay">
<div class="text">Hello World</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.image {
display: block;
width: 100%;
height: auto;
}
.img-content {
position: relative;
}
img {
display: block;
width: 100%;
height: auto;
}
.overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
background-image: linear-gradient( to right,
hsl(344, 100%, 50%),
hsl(31, 100%, 40%));
transition: opacity .3s ease-in 0s,transform .3s ease-in 0s,-webkit-transform .3s ease-in 0s;
opacity: 0;
overflow: hidden;
}
.img-content:hover .overlay {
opacity: 1;
}
.img-content:hover .overlay .text {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: