content logo

Bootstrap Thumbnails:

Float up Caption for Bootstrap Thumbnail on Hover

You probably have seen many websites that add images to their pages every day. The admin of these websites should try to change the theme of their pages. The Float up Caption for Bootstrap Thumbnail on Hover is a stupendous code that you can use for your website. This Bootstrap Thumbnail Caption helps you add photos to your page with a beautiful effect. Consequently, the Float in Thumbnail Code changes your website's design and you can attract more people. So, you can increase your audience and sell your products as soon as possible.

Here, we have prepared the preview of this code and you can see the beauty of the HTML Thumbnail Hover Effect. There are several pictures and as you move the cursor of the mouse on a picture, you can see some changes. After putting the mouse on a photo, you can see a gray field that appears with a hover effect. This field includes the title of the picture and its description. These writings are white and as you put the mouse away from the image, the written field will disappear. You can add different explanations to these photos. The Bootstrap Thumbnail Hover Effect is available for you.

 

#

Bootstrap Thumbnail Caption

#

Float in Thumbnail Code

#

HTML Thumbnail Hover Effect

#

Bootstrap Thumbnail Hover Effect

<!-- This script got from frontendfreecode.com -->
<div class="page-content m-5">
    <div class="row">
        <div class="col-12">
            <div class="container gallery">
                <div class="row text-center text-lg-start">
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                         <a data-glightbox="description:MyTitle" class="glightbox" title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/640/480" alt="">
                            </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                         <a data-glightbox="description:MyTitle" class="glightbox" title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/480/640" alt="">
                            </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My First Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox" title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/640/480" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Second Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox"  title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/480/640" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Third Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox"  title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/640/480" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Fourth Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox"  title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/480/640" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
.gallery__item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.4s, transform 0.35s;
}
.gallery__item img {
  width: calc(100% + 50px);
  max-width: calc(100% + 50px);
  transition: opacity 0.35s, transform 0.35s;
  transform: translate3d(-40px, 0, 0);
}
.gallery__item a {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
}
.gallery__item a:before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #000;
  z-index: 99;
  opacity: 0;
  transition: opacity 0.4s;
}
.gallery__item__description-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  color: #fff;
  visibility: hidden;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, visibility 0.2s;
}
.gallery__item__description-layer p {
  transition: 0.2s;
  transform: translateY(1em);
  background-color: #666;
  padding: 10px 20px;
}
.gallery__item:hover .gallery__item__description-layer {
  visibility: visible;
  opacity: 1;
}
.gallery__item:hover .gallery__item__description-layer p {
  transform: translateY(0);
}
@media only screen and (min-width: 992px) {
  .gallery__item {
    height: 200px;
    overflow: hidden;
  }
  .gallery__item:hover img {
    transform: translate3d(0, 0, 0);
    transition: opacity 0.35s, transform 0.35s;
  }
  .gallery__item:hover a:before {
    opacity: 0.3;
  }
}
 <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.2/css/bootstrap.min.css'>
<!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/5.0.2/css/bootstrap.min.css'>
<style>
.gallery__item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.4s, transform 0.35s;
}
.gallery__item img {
  width: calc(100% + 50px);
  max-width: calc(100% + 50px);
  transition: opacity 0.35s, transform 0.35s;
  transform: translate3d(-40px, 0, 0);
}
.gallery__item a {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
}
.gallery__item a:before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #000;
  z-index: 99;
  opacity: 0;
  transition: opacity 0.4s;
}
.gallery__item__description-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  color: #fff;
  visibility: hidden;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, visibility 0.2s;
}
.gallery__item__description-layer p {
  transition: 0.2s;
  transform: translateY(1em);
  background-color: #666;
  padding: 10px 20px;
}
.gallery__item:hover .gallery__item__description-layer {
  visibility: visible;
  opacity: 1;
}
.gallery__item:hover .gallery__item__description-layer p {
  transform: translateY(0);
}
@media only screen and (min-width: 992px) {
  .gallery__item {
    height: 200px;
    overflow: hidden;
  }
  .gallery__item:hover img {
    transform: translate3d(0, 0, 0);
    transition: opacity 0.35s, transform 0.35s;
  }
  .gallery__item:hover a:before {
    opacity: 0.3;
  }
}
</style>

</head>
<body>
<div class="page-content m-5">
    <div class="row">
        <div class="col-12">
            <div class="container gallery">
                <div class="row text-center text-lg-start">
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                         <a data-glightbox="description:MyTitle" class="glightbox" title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/640/480" alt="">
                            </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                         <a data-glightbox="description:MyTitle" class="glightbox" title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/480/640" alt="">
                            </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My First Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox" title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/640/480" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Second Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox"  title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/480/640" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Third Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox"  title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/640/480" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">My Fourth Title as one sentance</p>
                        </div>
                    </div>
                    <div class="gallery__item col-12 col-lg-3 col-md-6 mb-4 position-relative">
                        <a data-glightbox="description:MyTitle" class="glightbox"  title="MyTitle">
                            <img class="img-fluid" src="https://picsum.photos/480/640" alt="">
                        </a>
                        <div class="gallery__item__description-layer">
                            <p class="m-5">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>

</body>
</html>
Preview