From our sponsor: Ready to show your plugin skills? Enter the Penpot Plugins Contest (Nov 15-Dec 15) to win cash prizes!
Today we’d like to share a little gallery experiment with you. We wanted to revisit the classic look of scattered Polaroids and bring it to a next, flat level with some nice effects. The resulting gallery shows some Polaroid images with a title, randomly rotated and spread in a container. When navigating the images, the current one will be moved to the center and the resting Polaroids will move to the sides. Optionally, we’ll have a backside for each Polaroid which can be viewed by clicking the current dot of the navigation again. The indication for an existing backside will be a rotated arrow on the dot. Once the dot is clicked again, the dot itself will flip and so will the Polaroid, revealing the description on the back.
We use the following structure for the gallery:
<section id="photostack-1" class="photostack photostack-start"> <div> <!-- default Polaroid without backside --> <figure> <a href="http://goo.gl/Qw3ND4" class="photostack-img"> <img src="img/1.jpg" alt="img01"/> </a> <figcaption> <h2 class="photostack-title">Serenity Beach</h2> </figcaption> </figure> <!-- Polaroid with backside --> <figure> <a href="http://goo.gl/fhwlSP" class="photostack-img"> <img src="img/2.jpg" alt="img02"/> </a> <figcaption> <h2 class="photostack-title">Happy Days</h2> <!-- optional backside --> <div class="photostack-back"> <p>Fish don't fry in the kitchen and beans don't burn on the grill. Took a whole lotta tryin' just to get up that hill. Baby if you've ever wondered - wondered whatever became of me. </p> </div> </figcaption> </figure> <!-- Example for different shuffle iteration count --> <figure data-shuffle-iteration="3"> <!-- ... --> </figure> <!-- Example for a "dummy" Polaroid --> <figure data-dummy> <a href="#" class="photostack-img"><img src="img/7.jpg" alt="img07"/></a> <figcaption> <h2 class="photostack-title">Lovely Green</h2> </figcaption> </figure> <!-- ... --> </div> </section>
The “photostack-start” class can be used to show an initial overlay on the gallery container. Once the gallery is clicked, the items will make their first move and the first item will be shown in the middle.
The div
with the class “photostack-back” can be used to insert some more info for the backside of the Polaroid.
The shuffle iteration count (the amount of times we want all Polaroids to move around before the next item becomes current) can be controlled with the data-attribute data-shuffle-iteration.
Tiny break: 📬 Want to stay up to date with frontend and trends in web design? Subscribe and get our Collective newsletter twice a tweek.
The can also contain “dummy” items which will be shown in the container but which will not be part of the viewable gallery. This can be useful in cases where only a subset of a certain image collection should be shown. Imagine an article about your travels where in each section you describe a specific location. You’d set the irrelevant items as dummies and only the Polaroids that are specific to that location would be viewable in detail. In the next section you’d set the others to dummies.
Note that the main wrapping div
(immediate child of the section) is set to a width and height of 100%, which means that the items will be scattered across the whole container. If we would like to compact the space of spreading, we could also set the dimension of that div
to a smaller one.
Take a look at some screenshots of the gallery:
I hope you like this gallery idea and find it inspirational 🙂
very inspiring! thanks!
Awesome! This flipping action blew my mind!!
Svaka ?ast Manoela! Super su ti radovi 🙂
Great work!! Done without jQuery and using prototype ; )
Hey the Github link is not working 🙁
This is really cool btw, keep up the good work.
Thanks Matt!The link is now working.
Hello there, loved your gallery, I’m trying to do something similar but with song and auto slide..
I know how to put my audio file, but for the auto-slide.. is there a simple way for photostack to set an interval and do ‘next’?
Thank you !!
I tried it on my Galaxy Trend and it’s really sweet. I didn’t see the entire gallery but it was still working and was useable.
your-e fucking Awesome!
Please profanitize
This is nice…good work! But would be great if you can click on any picture and then effects to the middle 🙂
Nice gallery.
Could it be possible to expand it with autorotation of the images with stopping on hover. It would be a nice feature that could be used many places. Maybe an idea for your next project? 🙂
Great gallery!!! =D
Awesome work..
Can you please tell me the fonts used in back of image I really liked it and want to use it on my site
*I am a newbie and don’t know how to find it of my own
You can find fonts at http://www.fontsquirrel.com/ 🙂 There you can choose from fonts to put on your computer or in your web designs (use Eebfont kit for this) 🙂
nice job 😀
is there any one who use this a parallax background???
Usually super, Mary!
Hi
Really like the effect. What I would like to do is properly shuffle the cards every time what would be easiest way to do this?
Wow, Super… looks amazing!
very nice
I love the attention to detail in order for it to stay consistent with ‘flat’ design. Nice job.
Very nice… good creation. Thanks for your ideas.
Hola chicos, me encanta su blog, uso mucho de su material para paginas de mis clientes, me parece muy bueno todo lo que hacen y se que en algun momento estare en su altura.
Thank you!
From Argentina!
Hi! Thak You Mary Lou for gallery. But not supported Internet Explorer. What to do?
Veaceslav? Which version of internet explorer? 11? 10? 9?
Nice Workout.. thanks.
Impressive, nice job. Keep it up! 🙂
How long to develop it? (curious)
@Veaceslav : For me ie 11 is ok.
Thank you Mary Lou.
Nice work! Congratulations.
🙂
three words: i love you!
<3 you +MARY LOU
this is so cool, congratulations. Take care.
Hi! This is a really nice sketch but I wanted to ask if there is a way to make the text behind the polaroids selectable/clickable? Thanks.
Very nice.. keep it up.
This is beautifully amazing but there’s one thing that I wonder. Is this only works for WordPress, isn’t it? Could it be possible to use it on Blogger platform? ’cause my blog is running on Blogger platform but I desperately want this for my website. If you could help me it’d mean a whole lot. Thank you !!
This is really awesome 🙂
Nice job!but do not supply for IE 8,How to fix it ?
Hi,
Thanks for the Gallery. This is wonderful. Please tell me that it is for the wordpress only or for others also
Once again, a great plugin!
Thanks a lot for sharing!
Integrated into the new version of my website for an artistic galery and adopted 😉
No issues for me: works perfectly, ditto for the mobile version.
Étien’
Can this scattered Polaroid gallery be set to full screen?
Any chance l could get some info regarding making this fullscreen?
Can you please share code that will enable the side images to shuffle and stay completely within the div?
Definetely amazing.
How to implement auto sliding? I don’t like to click on each button…
thank you so much….
you are awesome ….
Its possible to make autoplay?
Why is there only 6 Polaroids in the Navigation, also when i have more then 6 figures in the code!?
Just take out the <figure data-dummy>…
Hi, Thanks for this great code! 🙂
I was wondering.. did it use to work on chrome? I when i flip a polaroid in demo 2 or 3 it doesn’t show. Tested in other browser and they seem to work. Anyone has an idea why it doesn’t work?
Hi Aron, thanks for your feedback! We are looking into it; Chrome Version 37.0.2062.94 on Mac does not seem to handle the backface-visibility well here. I’ll post an update once we find out how to fix it. Thanks again and cheers, ML
I have found the solution. It appears, that the new version of chrome sets the z-indexes differently of transformed elements (probably to 0 or lower). I can’t confirm, but the solution is rather simple, just set the z-index of the photostack back to 1.
.csstransformspreserve3d figure.photostack-flip .photostack-back { z-index: 1; }
That’s it 🙂
Thanks a lot Ernest, that works fine and we’ve updated the code. Cheers, ML.
Hi
This code has stopped working in Chrome (mac) since it recently updated to version 37, any ideas how to fix the issue?
Hi. I love this idea and would like to use it on my website/blog! Is there any way to import this into WordPress to use instead of their gallery?
Hi Is there anyway to make this responsive I am testing it locally with webmatrix but when I open it with the iphone the images just show backwards text instead of the image
This gallery looks cool 🙂
I have 16 images and it shows only 6 pictures.
Is there any way to show all 16 pictures??
Great Codrops!
Here my implementation of this (real-time instagram gallery):
http://ramosquis.info/polaroidgram/
Thank you again for the inspiration.
Best regards,
Raúl.
Anyone got it to work in autoplay??
Got it tot work in autoplay mode.
If anyone interested I will put it on github.
Hi Bas
Please can you share the autoplay version, i have been trying, but couldn’t figure out yet
Hi Bas, please can you send me these files or let me know when i can find them.
Thanks
Hi Bas,
Please help me about auto play for this. Thanks so much.
I’m trying to put this in autoplay mode.
Using this I can make them move, but…
setInterval( function(idx) { self._shuffle(); }, 4000);
But I can only make shuffle the ones that aren’t active.
Can anyone help me?
Hi Mary Lou,
Many thanks for this great article and all the other ones, as I feel you provide us with great ideas for a better web!
For this particular article, I am trying to implement it, but am struggling with contents on the back of the images, as content is sometimes longer than the container. Unfortunately setting
overflow:auto
on the back container does not solve the problem, as somehow the scroll bar shows, but cannot be accessed. This seems to be also linked to Arsh Shah Dilbagi (Robo)’s question from back in March, where he said he can’t select the text on the back.An example, using Ramosquis’ implementation: look at the second polaroid on this page, the overflow is pretty ugly as content is too long, so I tried to add
overflow:auto
to.photostack-back
(in Chrome DevTools only).I have tested this in most browsers, and it only works in IE (that’s a first!). Would you be able to advise how this could be resolved? I have tried finding a solution or workaround, without success.
Many thanks in advance for your (or anyone else’s) input,
Wishing you all the best,
Nico
Update since yesterday: I have applied a Firefox update, and it seems this now works in Firefox as expected (Firefox 33.1 on Windows 8.1). The
.photostack-back
also responds to:hover
css as expected.It still does not want to play nice in Chrome (I tested Chome Beta 39.0.2171 and Canary 41.0.2218).