Polaroid-like Stacked Image Slideshow Transition Effects

Stacked Photo Slideshow script (feat. kittens) allows you to create a Polaroid Gallery-like stacked photo slideshow using pure JavaScript and CSS/CSS3. Hover over and click the slide show to switch between photos.

side by side image slider, image slider html css, image slider ui design, creative image slider, fancy slider, image slider transition effects css, creative slider codepen

How to make use of it:

1. Create a set of images for a slideshow.

<div class="images">
  <img class="image" src="1.jpg">
  <img class="image" src="2.jpg">
  <img class="image" src="3.jpg">
  <img class="image" src="4.jpg">
  <img class="image" src="5.jpg">

2. Basic CSS Styles for Slideshows.

.image {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 200px;
  width: 200px;
  margin-top: -110px;
  margin-left: -105px;
  border: 5px solid #fff;
  border-bottom-width: 15px;
  -moz-box-shadow: 0 2px 5px rgba(30, 30, 30, 0.25);
  -webkit-box-shadow: 0 2px 5px rgba(30, 30, 30, 0.25);
  box-shadow: 0 2px 5px rgba(30, 30, 30, 0.25);
  z-index: 2;
  -moz-transition: -moz-transform 0.3s ease-in-out;
  -o-transition: -o-transform 0.3s ease-in-out;
  -webkit-transition: -webkit-transform 0.3s ease-in-out;
  transition: transform 0.3s ease-in-out;
.image:first-child {
  -moz-transform: rotate(8deg);
  -ms-transform: rotate(8deg);
  -webkit-transform: rotate(8deg);
  transform: rotate(8deg);
.image:nth-child(2) {
  -moz-transform: rotate(2deg);
  -ms-transform: rotate(2deg);
  -webkit-transform: rotate(2deg);
  transform: rotate(2deg);
.image:nth-child(3) {
  -moz-transform: rotate(-3deg);
  -ms-transform: rotate(-3deg);
  -webkit-transform: rotate(-3deg);
  transform: rotate(-3deg);
.image:nth-child(4) {
  -moz-transform: rotate(-10deg);
  -ms-transform: rotate(-10deg);
  -webkit-transform: rotate(-10deg);
  transform: rotate(-10deg);
.image:last-child {
  -moz-transform: rotate(-5deg);
  -ms-transform: rotate(-5deg);
  -webkit-transform: rotate(-5deg);
  transform: rotate(-5deg);

3. Slide show when hovering over photos and switching between photos.

.images:hover .image:nth-child(4) {
  -moz-transform: rotate(10deg) translateX(50px);
  -ms-transform: rotate(10deg) translateX(50px);
  -webkit-transform: rotate(10deg) translateX(50px);
  transform: rotate(10deg) translateX(50px);
.images:hover .image:nth-child(3) {
  -moz-transform: rotate(3deg) translateX(75px);
  -ms-transform: rotate(3deg) translateX(75px);
  -webkit-transform: rotate(3deg) translateX(75px);
  transform: rotate(3deg) translateX(75px);
.images:hover .image:nth-child(2) {
  -moz-transform: rotate(-2deg) translateX(-50px);
  -ms-transform: rotate(-2deg) translateX(-50px);
  -webkit-transform: rotate(-2deg) translateX(-50px);
  transform: rotate(-2deg) translateX(-50px);
.images:hover .image:first-child {
  -moz-transform: rotate(-8deg) translateX(-75px) translateY(-10px);
  -ms-transform: rotate(-8deg) translateX(-75px) translateY(-10px);
  -webkit-transform: rotate(-8deg) translateX(-75px) translateY(-10px);
  transform: rotate(-8deg) translateX(-75px) translateY(-10px);
.image.slide-right {
  -moz-transform: rotate(290deg) translateX(250px);
  -ms-transform: rotate(290deg) translateX(250px);
  -webkit-transform: rotate(290deg) translateX(250px);
  transform: rotate(290deg) translateX(250px);
.image.slide-left {
  -moz-transform: rotate(-290deg) translateX(-250px);
  -ms-transform: rotate(-290deg) translateX(-250px);
  -webkit-transform: rotate(-290deg) translateX(-250px);
  transform: rotate(-290deg) translateX(-250px);
.image.back { z-index: 1; }

4. The essence of JavaScript is to activate the slide show.

(function() {
  var cssTransition, imageOffset, imageWidth, images, queue, timeout, touch;
  cssTransition = function() {
    var body, i, len, style, vendor, vendors;
    body = document.body || document.documentElement;
    style = body.style;
    vendors = ['Moz', 'Webkit', 'O'];
    if (typeof style['transition'] === 'string') {
      return true;
    for (i = 0, len = vendors.length; i < len; i++) {if (window.CP.shouldStopExecution(1)){break;}
      vendor = vendors[i];
      if (typeof style[vendor + 'Transition'] === 'string') {
        return true;
    return false;
  queue = false;
  touch = document.documentElement['ontouchstart'] !== void 0;
  images = document.querySelector('.images');
  imageWidth = images.firstElementChild.offsetWidth;
  imageOffset = images.firstElementChild.offsetLeft;
  timeout = cssTransition() ? [300, 400] : [0, 0];
  images.addEventListener((touch ? 'touchend' : 'click'), function(event) {
    var direction, lastClassList;
    if (queue) {
    queue = true;
    if (((touch ? event.changedTouches[0].pageX : event.pageX) - imageOffset) > imageWidth / 2) {
      direction = 'slide-right';
    } else {
      direction = 'slide-left';
    lastClassList = images.lastElementChild.classList;
    return setTimeout(function() {
      return setTimeout(function() {
        images.insertBefore(images.lastElementChild, images.firstElementChild);
        return queue = false;
      }, timeout[0]);
    }, timeout[1]);
  }, false);

3d Image Slideshow Using HTML and CSS in Bootstrap

Polaroid-like Stacked Image Slideshow, Stacked Image Slideshow Plugin/Github, slider animation effects

See Demo And Download

Official Website(sacha): Click Here

This superior jQuery/javascript plugin is developed by sacha. For extra advanced usage, please go to the official website.

Related Posts


Responsive Image Gallery Lightbox jQuery Plugin | VenoBox

VenoBox is a responsive jQuery modal window plugin suitable for images, embedded content, iFrames, Google Maps, Vimeo, and YouTube videos. The big difference compared to many other…


[Animation] Bootstrap Multi-Level Responsive Dropdown Menu

Bootstrap-based multi-level dropdown navigation menu with cool animations. The dropdown on Hover is a jQuery plugin used to create Bootstrap multi-level scroll-triggered dropdown menus with CSS3 animations…


Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…


HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….


CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…


How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Leave a Reply

Your email address will not be published. Required fields are marked *