Bootstrap snippet and html example. Image gallery with effects

Bootstrap 3.3.2 snippet "Image gallery with effects" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: image,gallery,effects

HTML code

Clean, semantic HTML that powers this Bootstrap 3.3.2 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<div class="container img-content">
    <div class="row">
        <h2 class="text-center text-muted title">Image Gallery With Effects</h2>
    </div> 
    <div class="row">
      <div class="col-md-3 col-sm-4 col-xs-6 gray"><img class="img-responsive" src="https://www.bootdey.com/image/400x200/7FFFD4/000000" /></div>
        <div class="col-md-3 col-sm-4 col-xs-6 shrink "><img class="img-responsive" src="https://www.bootdey.com/image/400x200/8A2BE2/000000"/></div>
        <div class="col-md-3 col-sm-4 col-xs-6 vertpan"><img class="img-responsive" src="https://www.bootdey.com/image/400x200/5F9EA0/000000" /></div>
        <div class="col-md-3 col-sm-4 col-xs-6 tilt"><img class="img-responsive" src="https://www.bootdey.com/image/400x200/FF7F50/000000"/></div>
      <div class="col-md-3 col-sm-4 col-xs-6 gray"><img class="img-responsive" src="https://www.bootdey.com/image/400x200/DC143C/000000" /></div>
        <div class="col-md-3 col-sm-4 col-xs-6 shrink "><img class="img-responsive" src="https://www.bootdey.com/image/400x200/FF1493/000000" /></div>
        <div class="col-md-3 col-sm-4 col-xs-6 vertpan"><img class="img-responsive" src="https://www.bootdey.com/image/400x200/9400D3/000000" /></div>
        <div class="col-md-3 col-sm-4 col-xs-6 tilt"><img class="img-responsive" src="https://www.bootdey.com/image/400x200/228B22/000000" /></div>
    </div>
</div>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 3.3.2 to keep the design, spacing, and responsiveness consistent.

.img-content {
    margin-top:40px;    
}

.img-content .title {
    margin-bottom:20px;    
}

img {
  -moz-box-shadow:    3px 3px 5px 6px #ccc;
  -webkit-box-shadow: 3px 3px 5px 6px #ccc;
  box-shadow:         3px 3px 5px 6px #ccc;
  margin-bottom:20px;
}

.gray img:hover{
  filter: gray;
  -webkit-filter: grayscale(1); 
}

.tilt img:hover {
  -webkit-transform: rotate(-10deg);
     -moz-transform: rotate(-10deg);
       -o-transform: rotate(-10deg);
      -ms-transform: rotate(-10deg);
          transform: rotate(-10deg);
          
    -webkit-transition-duration: 500ms;
       -moz-transition-duration: 500ms;
         -o-transition-duration: 500ms;
            transition-duration: 500ms;
}


.vertpan img:hover {
  margin-top: -50px;
  -webkit-transition: margin 1s ease;
     -moz-transition: margin 1s ease;
       -o-transition: margin 1s ease;
      -ms-transition: margin 1s ease;
          transition: margin 1s ease;

}

.shrink img:hover {
    opacity: 0.7;
    cursor: pointer;
    border-radius: 0px;
  -webkit-transform: scale(1.2, 1.2);
  -webkit-transition-timing-function: ease-out;
                      -moz-transform: scale(1.2, 1.2);
     -moz-transition-timing-function: ease-out;
                       -ms-transform: scale(1.20, 1.20);
      -ms-transition-timing-function: ease-out;

         -webkit-transition-duration: 500ms;
            -moz-transition-duration: 500ms;
             -ms-transition-duration: 500ms;

}

.tilt img:hover {
  -webkit-transform: rotate(-10deg);
     -moz-transform: rotate(-10deg);
       -o-transform: rotate(-10deg);
      -ms-transform: rotate(-10deg);
          transform: rotate(-10deg);
}

 

Similar snippets

Bootstrap example and template. V card presentation

V card presentation

Bootstrap example and template. Gallery with pagination

Gallery with pagination

Bootstrap example and template. Blog image Gallery Widget

Blog image Gallery Widget

Bootstrap example and template. profile gallery with search input

profile gallery with search input

Bootstrap example and template. Why choose Us

Why choose Us

Bootstrap example and template. Bootstrap 3 Control Panel admin dashboard

Bootstrap 3 Control Panel admin dashboard

Bootstrap example and template. login with overlay image

login with overlay image

Bootstrap example and template. Floating menu

Floating menu

FAQ

How do I use this snippet?

Include Bootstrap 3.3.2, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 3.3.2.

Bootstrap example and template. Image gallery with effects

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 18.3K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 3.3.2

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.3.2 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

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

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