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, paste, change, customize and run the following HTML code to get a result like the one shown in the preview selection

<div class="container">
<div class="col-md-12">
  <div class="popup-gallery">
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/FF4500" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/FFA500" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/DA70D6" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/663399" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/4169E1" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/6A5ACD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/87CEEB" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/4682B4" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/008080" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/40E0D0" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/FA8072" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/663399" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/DDA0DD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/98FB98" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/AFEEEE" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/FFDAB9" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/EEE8AA" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/000080" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/DDA0DD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/FF4500" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/6A5ACD" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/87CEEB" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/128x100/FA8072" alt=""></a>
    <a href="#" title="Photo 1"><img src="https://via.placeholder.com/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, paste, change, customize and run the following CSS code to get a result Like the one shown in the preview selection

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 css code used to create this bootstrap snippet, You can copy, paste, change, customize and run the following JS code to get a result Like the one shown in the preview selection

$(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 Bootstrap Gallery with Modal Lightbox and Carousel example

Bootstrap Gallery with Modal Lightbox and Carousel

Bootstrap Image gallery with effects example

Image gallery with effects

Bootstrap gallery with small images example

gallery with small images

Bootstrap image gellery example

image gellery

Bootstrap owl carousel events example

owl carousel events

Bootstrap blog list page example

blog list page

Bootstrap Gallery with pagination example

Gallery with pagination

Bootstrap Whatsapp web chat template example

Whatsapp web chat template

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.2K 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