Bootstrap snippet. gallery small images with hover

This snippet was created to help web designers, front-end and back-end developer save time. Use it for free in your project and build your app faster,
You can also download the HTML, CSS, and JS code.
Tags: images,hover,gallery

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 3.3.6 included, to get the result that you can see in the preview selection

Download
<div class="container">
<div class="col-md-12">
  <div class="popup-gallery">
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/FF4500" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/FFA500" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/DA70D6" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/663399" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/4169E1" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/6A5ACD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/87CEEB" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/4682B4" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/008080" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/40E0D0" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/FA8072" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/663399" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/DDA0DD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/98FB98" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/AFEEEE" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/FFDAB9" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/EEE8AA" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/000080" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/DDA0DD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/FF4500" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/6A5ACD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/87CEEB" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/FA8072" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://www.bootdey.com/image/128x100/663399" alt=""></a>
  </div>
</div>
</div>

<!-- Modal -->
<div class="modal fade" id="modalShow" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body text-center">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 3.3.6 included, to get the result that you can see in the preview selection

Download
body{margin-top:20px;}

.popup-gallery a img {
    margin: 2px 0;
    width:128px;
    height:100px;
    
    display: inline-block;
    line-height: 1.42857143;
    background-color: #fff;
    -webkit-transition: border .2s ease-in-out;
    -o-transition: border .2s ease-in-out;
    transition: border .2s ease-in-out;
}

.popup-gallery a img:hover {
	opacity: 0.6;
	filter: alpha(opacity=60); /* For IE8 and earlier */
}

Javascript/Jquery code

This is the javascript code used to create this bootstrap snippet, You can copy and paste the following javascript code inside a page with bootstrap 3.3.6 included, to get the result that you can see in the preview selection

Download
$(document).ready(function() {
  $("img").click(function(){
    var img = $(this).attr("src");
    $("#modalShow .modal-body").html("<img src='"+img+"' class='img-responsive'>");
     $("#modalShow").modal("show");
  });
}) 

Similar snippets

Bootstrap bs4 blog post with image hover example

bs4 blog post with image hover

Bootstrap Bootstrap Gallery with Modal Lightbox and Carousel example

Bootstrap Gallery with Modal Lightbox and Carousel

Bootstrap User Profile with tabs example

User Profile with tabs

Bootstrap gallery images profile example

gallery images profile

Bootstrap bs5 dark footer example

bs5 dark footer

Bootstrap profile with data and skills example

profile with data and skills

Bootstrap white chat example

white chat

Bootstrap chat app example

chat app

Bootstrap gallery small images with hover example

About this bootstrap snippet

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This snippet currectly have 4.6K views, Using this bootstrap snippet you have the following benefits:

Bootstrap 3.3.6

This snippet is based on bootstrap 3.3.6 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

Jquery plugins

Great built-in plugins with jquery framework, you can easy to change all declarations

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This snippet can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working