I have the following HTML block.
/* Set height of the grid so .sidenav can be 100% (adjust if needed) */
.row.content {
height: 1500px;
}
/* Set gray background color and 100% height */
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: white;
padding: 15px;
}
.center-banner {
height: 145px;
background-repeat: no-repeat;
}
.work-box-container .work-box {
background: url(https://i.postimg.cc/Z5gq4xHd/Promotionaloff.png);
}
.work-box-container:hover .work-box {
background: url(https://i.postimg.cc/ZKwRDSyj/Promotionalon.png);
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {
height: auto;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid center-banner">
<div class="row content">
<div class="">
<div class="work-box-container ">
<div class="work-box center-banner">
</div>
</div>
</div>
</div>
</div>
<footer class="container-fluid">
<p>Footer Text</p>
</footer>
</body>
</html>
Hover effect is not working properly on first load.
I have checked here, but couldn't make it work.