content logo

Bootstrap Sliders:

Bootstrap Image Reveal on Button Hover

You have to use a bootstrap for your website that fits the color of your page. In this post, we are going to introduce a beautiful bootstrap that suits most kinds of websites. The Bootstrap Image Reveal on Button Hover is presented in this post with an incredible design. By using this Bootstrap Slider Code, you can mention a lot of information and images in a small space. It means that the occupied space will be reduced. You can see the related picture of the text with the help of this Simple Sliding on Hover.

There is a preview of this code down below and you can realize its beautiful design. As you see here, this HTML Slider Hover Effect has an orange theme with four sections. Each section has its related number and the texts are represented in white color. If you put the cursor of the mouse on a section or click on it, its color changes to black. Plus, a black line will display at the bottom of the selected part. After this step, its related image will appear smoothly. The titles of the JavaScript Slider with Image are placed on the left and the picture is located on the right side of the page.

#

Bootstrap Slider Code

#

Simple Sliding on Hover

#

Javascript Slider with Image

#

HTML Slider Hover Effect

<!-- This script got from frontendfreecode.com -->
<div class="container mt-5">
  <div class="row">
    <div class="col-lg-3 col-3">
      <a href="http://www.frontendfreecode.com" class="btn d-block active" data-id="btn-1">Forest</a>
      <a href="http://www.frontendfreecode.com" class="btn d-block" data-id="btn-2">Mountain</a>
      <a href="http://www.frontendfreecode.com" class="btn d-block" data-id="btn-3">Beach</a>
      <a href="http://www.frontendfreecode.com" class="btn d-block" data-id="btn-4">Sea</a>
    </div>
    <div class="col-lg-9 col-9">
      <div>
        <img class="img-fluid btn-1 active" src="http://frontendfreecode.com/img/background-1.jpg" />
      </div>
      <div>
        <img class="img-fluid btn-2" src="http://frontendfreecode.com/img/background-2.jpeg" />
      </div>
      <div>
        <img class="img-fluid btn-3" src="http://frontendfreecode.com/img/background-3.jpeg" />
      </div>
      <div>
        <img class="img-fluid btn-4" src="http://frontendfreecode.com/img/background-4.jpeg" />
      </div>
    </div>
  </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
body {
  font-family: system-ui;
  background: #f06d06;
  color: white;
  counter-reset: button;
}
a.btn {
  color: #fff;
  background: transparent;
  padding: 0;
  margin: 10px 0;
  font-weight: 600;
  position: relative;
  font-size: 50px;
  text-align: left;
}
a.btn::before {
  counter-increment: button;
  content: "0" counter(button) "";
  width: 50px;
  height: 35px;
  background: transparent;
  position: absolute;
  top: -10px;
  left: -40px;
  z-index: 9;
  display: flex;
  flex-direction: row;
  align-items: center;
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  -webkit-transform: rotate(
    -90deg) translateY(0);
  -ms-transform: rotate(-90deg) translateY(0);
  transform: rotate(
    -90deg) translateY(0);
}
a.btn.active {
  color: #000;
}
a.btn.active::before{
  color: #000;
}
a.btn.active::after {
  -webkit-transform: scaleX(1);
  -ms-transform: scaleX(1);
  transform: scaleX(1);
}
a.btn::after {
  content: '';
  position: absolute;
  top: 95%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  -webkit-transform: scaleX(0);
  -ms-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transform-origin: 100% 0;
  -ms-transform-origin: 100% 0;
  transform-origin: 100% 0;
  -webkit-transition: -webkit-transform .3s cubic-bezier(.45,.46,.05,.96);
  -o-transition: transform .3s cubic-bezier(.45,.46,.05,.96);
  transition: transform .3s cubic-bezier(.45,.46,.05,.96);
  transition: transform .3s cubic-bezier(.45,.46,.05,.96),-webkit-transform .3s cubic-bezier(.45,.46,.05,.96);
}
@media (max-width: 800px) {
a.btn{
    font-size:18px;
}
}
.img-fluid {
  display: none;
}
.img-fluid.active {
  display: block;
}
jQuery(document).ready(function ($) {
    $("a.btn").mouseover(function (event) {
        event.preventDefault();
        var id = $(this).data("id");
        $("a.btn").removeClass("active");
        $(this).addClass('active');
        $(".img-fluid").removeClass("active");
        $("." + id).addClass('active')
    });
});
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.0/css/bootstrap.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.0/js/bootstrap.min.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.0/css/bootstrap.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.0/js/bootstrap.min.js'></script>
<style>
body {
  font-family: system-ui;
  background: #f06d06;
  color: white;
  counter-reset: button;
}
a.btn {
  color: #fff;
  background: transparent;
  padding: 0;
  margin: 10px 0;
  font-weight: 600;
  position: relative;
  font-size: 50px;
  text-align: left;
}
a.btn::before {
  counter-increment: button;
  content: "0" counter(button) "";
  width: 50px;
  height: 35px;
  background: transparent;
  position: absolute;
  top: -10px;
  left: -40px;
  z-index: 9;
  display: flex;
  flex-direction: row;
  align-items: center;
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  -webkit-transform: rotate(
    -90deg) translateY(0);
  -ms-transform: rotate(-90deg) translateY(0);
  transform: rotate(
    -90deg) translateY(0);
}
a.btn.active {
  color: #000;
}
a.btn.active::before{
  color: #000;
}
a.btn.active::after {
  -webkit-transform: scaleX(1);
  -ms-transform: scaleX(1);
  transform: scaleX(1);
}
a.btn::after {
  content: '';
  position: absolute;
  top: 95%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  -webkit-transform: scaleX(0);
  -ms-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transform-origin: 100% 0;
  -ms-transform-origin: 100% 0;
  transform-origin: 100% 0;
  -webkit-transition: -webkit-transform .3s cubic-bezier(.45,.46,.05,.96);
  -o-transition: transform .3s cubic-bezier(.45,.46,.05,.96);
  transition: transform .3s cubic-bezier(.45,.46,.05,.96);
  transition: transform .3s cubic-bezier(.45,.46,.05,.96),-webkit-transform .3s cubic-bezier(.45,.46,.05,.96);
}
@media (max-width: 800px) {
a.btn{
    font-size:18px;
}
}
.img-fluid {
  display: none;
}
.img-fluid.active {
  display: block;
}
</style>

</head>
<body>
<div class="container mt-5">
  <div class="row">
    <div class="col-lg-3 col-3">
      <a href="http://www.frontendfreecode.com" class="btn d-block active" data-id="btn-1">Forest</a>
      <a href="http://www.frontendfreecode.com" class="btn d-block" data-id="btn-2">Mountain</a>
      <a href="http://www.frontendfreecode.com" class="btn d-block" data-id="btn-3">Beach</a>
      <a href="http://www.frontendfreecode.com" class="btn d-block" data-id="btn-4">Sea</a>
    </div>
    <div class="col-lg-9 col-9">
      <div>
        <img class="img-fluid btn-1 active" src="http://frontendfreecode.com/img/background-1.jpg" />
      </div>
      <div>
        <img class="img-fluid btn-2" src="http://frontendfreecode.com/img/background-2.jpeg" />
      </div>
      <div>
        <img class="img-fluid btn-3" src="http://frontendfreecode.com/img/background-3.jpeg" />
      </div>
      <div>
        <img class="img-fluid btn-4" src="http://frontendfreecode.com/img/background-4.jpeg" />
      </div>
    </div>
  </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
jQuery(document).ready(function ($) {
    $("a.btn").mouseover(function (event) {
        event.preventDefault();
        var id = $(this).data("id");
        $("a.btn").removeClass("active");
        $(this).addClass('active');
        $(".img-fluid").removeClass("active");
        $("." + id).addClass('active')
    });
});
</script>

</body>
</html>
Preview