Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <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>Refresh page or resize browswer to randomize; mouseover or touch images for more info. Photographs by <a href="http://stuckincustoms.smugmug.com/Burning-Man-Page">Trey Ratcliff</a>.</p>
              
            
!

CSS

              
                * { 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; }
}
              
            
!

JS

              
                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();
              
            
!
999px

Console