Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <section>
  <h1>Check Out These Bears</h1>
  
<ul class="photo-stack-grid">
  <li>
    <a href="#d">
      <figure class="photo-stack">
          
          
        <!-- 
            ***change aspect ratio of image - /200/400*** 
        -->
        <img src="http://placebear.com/200/200" alt="picture" />
          
          
      </figure>
      <span>Bears Over There</span>
    </a>
  </li>
  <li>
    <a href="#d">
      <figure class="photo-stack">
        <img src="http://placebear.com/g/200/200" alt="picture" />
      </figure>
      <span>Some Bears Are Right There</span>
    </a>
  </li>
  <li>
    <a href="#d">
      <figure class="photo-stack">
        <img src="http://placebear.com/400/400" alt="picture" />
      </figure>
      <span>That Bear Is Looking Right At You</span>
    </a>
  </li>
  <li>
    <a href="#d">
      <figure class="photo-stack">
        <img src="http://placebear.com/611/611" alt="picture" />
      </figure>
      <span>What A Bear</span>
    </a>
  </li>
  <li>
    <a href="#d">
      <figure class="photo-stack">
        <img src="http://placebear.com/309/309" alt="picture" />
      </figure>
      <span>Some Bears Are Right There</span>
    </a>
  </li>
  <li>
    <a href="#d">
      <figure class="photo-stack">
        <img src="http://placebear.com/546/546" alt="picture" />
      </figure>
      <span>That Bear Is Looking Right At You</span>
    </a>
  </li>
  <li>
    <a href="#d">
      <figure class="photo-stack">
        <img src="http://placebear.com/g/400/400" alt="picture" />
      </figure>
      <span>What A Bear</span>
    </a>
  </li>
</ul>
</section>
              
            
!

CSS

              
                *,
*:before,
*:after {
	box-sizing: border-box;
}
body {
  background: url(https://f.cl.ly/items/2u1z0Y0I1U061j410F08/debut_light.png);
}
section {
  max-width: 1000px;
  margin: 2.6em auto;
  padding: 0 4%;
}
h1 {
  font: normal 1.8em/1.3 Capita, Georgia, serif;
  margin: 0 0 1.2em;
  color: #8ab300;
}
.photo-stack-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.photo-stack-grid:after {
  content: " ";
  display: table;
  clear: both;
}
.photo-stack-grid li {
  width: 46%;
  float: left;
  margin: 0 8% 2.8em 0;
}
.photo-stack-grid li:nth-child(2n) {
  margin-right: 0;
}

/* remember to clear first item in each row */
.photo-stack-grid li:nth-child(2n + 1) {
  clear: left;
}

.photo-stack-grid a {
  display: block;
  color: #333;
  text-decoration: none;
  font: 600 0.8em/1.3 "Open Sans", sans-serif;
  
}
span {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
}
.photo-stack {
	position: relative;
	margin: 0 4% 2em;
  display: block;
}
.photo-stack:before,
.photo-stack:after,
.photo-stack img {
	display: block;
	background: #ccc;
	border: 5px solid #fff;
  border-radius: 3px;
	padding: 1px;
	
}
.photo-stack:before,
.photo-stack:after {
  content: '';
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	background: #969289;
  box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.3);
  transform: rotate(6deg);
}
.photo-stack:after {
	transform: rotate(10deg);
  z-index: -1;
}
.photo-stack img {
	transform: rotate(0deg);
	width: 100%;
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.2),
              0 14px 18px -12px rgba(0, 0, 0, 0.9);
}
.ie8 .photo-stack:before,
.ie8 .photo-stack:after {
	display: none;
}

@media (min-width: 620px) {
    body {
      font-size: 120%;
    }
    .photo-stack-grid li {
      width: 19%;
    }
    .photo-stack-grid li:nth-child(2n) {
      margin-right: 8%;
    }
    .photo-stack-grid li:nth-child(2n + 1) {
      clear: none;
    }
    .photo-stack-grid li:nth-child(4n) {
      margin-right: 0;
    }
    .photo-stack-grid li:nth-child(4n + 1) {
      clear: left;
    }
}
              
            
!

JS

              
                


              
            
!
999px

Console