<div id="burningman">
<figure>
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/love-bike.jpg" alt>
    <figcaption>Love Bike, Burning Man 2014</figcaption>
</figure>
<figure class="halvies">
		<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/burning-man-pyre.jpg" alt >
       <figcaption><a href="https://www.indiegogo.com/projects/truth-is-beauty-the-bliss-project-fa">Truth is Beauty</a>, Burning Man 2013</figcaption>
</figure>
<figure>
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/believe-burning-man.jpg" alt>
      <figcaption>Believe, Burning Man 2014</figcaption>
</figure>
<figure>
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/foot-of-the-statue.jpg" alt>
   <figcaption><a href="https://www.indiegogo.com/projects/truth-is-beauty-the-bliss-project-fa">Truth is Beauty</a>, Burning Man 2013</figcaption>
</figure>
<figure>
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/the-great-heads.jpg" alt>
	<figcaption><a href=http://embrace2014.com/>Embrace</a>, Burning Man 2014</figcaption>
</figure>
</div>
<p>Обновіть сторінку або змініть розмір вікна браузера для рандомізації; Наведіть на зображення для деталей.</p>
* { box-sizing: border-box; }
body { 
  font-family: Avenir, Arial, sans-serif; 
  background: #222; 
  margin: 2rem;
  color: #fff;
}
#burningman { 
  display: flex; 
  flex-flow: row wrap;
  font-size: 0; 
}
#burningman figure { 
  flex: 1; 
  margin: 0; 
  min-width: 300px;
  position: relative;
  overflow: hidden; 
}
#burningman figure figcaption { 
  background: rgba(0,0,0,0.4); 
  font-size: 1.1rem; 
  position: absolute;
  bottom: 0; width: 100%;
  padding: .5rem; 
  opacity: 0;
  transition: .5s; 
}
a { 
  color: inherit;
  text-decoration: none;
  font-style: italic; 
}
#burningman figure:hover img.visible + figcaption { opacity: 1; }
#burningman figure img { 
  width: 100%;
  height: auto; 
  opacity: 0;
  transition: .5s; 
}
#burningman figure.halvies { 
  flex: .5015;
  min-width: 150px; 
}
#burningman figure 

img.visible { opacity: 1; }
#burningman + p { font-size: 1.1rem; }
@media all and (max-width: 500px) {
  #burningman { -webkit-box-orient: vertical; -webkit-flex-direction: column;
-ms-flex-direction: column; flex-direction: column; }
}
function randomize() {
  for (var i = rando.children.length; i >= 0; i--){
 rando.appendChild(rando.children[Math.random() * i | 0]); 
}
}

function makeVis(j) {
	var photo = rando.children[j].firstElementChild;
	setTimeout(function() { photo.classList.add("visible"); }, 700 * j);
}

function sequentize(){
for (var j = 0; j <= rando.children.length; ++j) 
   makeVis(j);
}

var rando = document.getElementById('burningman'), waiter;
   
function fsort() {
randomize();
sequentize();
}
	
window.onresize = function() { 
  clearTimeout(waiter);
  waiter = setTimeout(fsort, 1000);
}

fsort();

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js