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

              
                <figure class="snip1213">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample78.jpg" alt="sample78"/>
  <figcaption>
    <h3>Parsley Montana</h3>
    <p>We are so busy watching out for what's just ahead of us that we don't take the time to enjoy where we are.</p>
    <a href="#" class="read-more">Read More</a>
  </figcaption>
</figure>
<figure class="snip1213 hover">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample79.jpg" alt="sample79"/>
  <figcaption>
    <h3>Inverness McKenzie</h3>
    <p>Calvin: Can you make a living playing silly games? His Dad: Actually, you can be among the most overpaid people on the planet. </p>
    <a href="#" class="read-more">Read More</a>
  </figcaption>
</figure>
<figure class="snip1213">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample80.jpg" alt="sample80"/>
  <figcaption>
    <h3>Fleece Marigold</h3>
    <p>Summer is butter on your chin and corn mush between every tooth.</p>
    <a href="#" class="read-more">Read More</a>
  </figcaption>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,500,800);
figure.snip1213 {
  font-family: 'Raleway', Arial, sans-serif;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  max-height: 220px;
  width: 100%;
  color: #ffffff;
  text-align: left;
  background-color: #07090c;
  font-size: 16px;
  -webkit-perspective: 50em;
  perspective: 50em;
}
figure.snip1213 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.6s ease;
  transition: all 0.6s ease;
}
figure.snip1213 img {
  max-width: 100%;
  -webkit-transform-origin: 100% 50%;
  transform-origin: 100% 50%;
}
figure.snip1213 figcaption {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  -webkit-transform: rotateY(90deg) translate(0%, -50%);
  transform: rotateY(90deg) translate(0%, -50%);
  -webkit-transform-origin: 0 50%;
  transform-origin: 0 50%;
  z-index: 1;
  opacity: 0;
  padding: 0 30px;
}
figure.snip1213 h3,
figure.snip1213 p {
  line-height: 1.5em;
}
figure.snip1213 h3 {
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
}
figure.snip1213 p {
  font-size: 0.8em;
  font-weight: 500;
  margin: 0 0 15px;
}
figure.snip1213 .read-more {
  border: 2px solid #ffffff;
  padding: 0.5em 1em;
  font-size: 0.8em;
  text-decoration: none;
  color: #ffffff;
  display: inline-block;
}
figure.snip1213 .read-more:hover {
  background-color: #ffffff;
  color: #000000;
}
figure.snip1213:hover img,
figure.snip1213.hover img {
  -webkit-transform: rotateY(-90deg);
  transform: rotateY(-90deg);
  opacity: 0;
}
figure.snip1213:hover figcaption,
figure.snip1213.hover figcaption {
  -webkit-transform: rotateY(0deg) translate(0, -50%);
  transform: rotateY(0deg) translate(0, -50%);
  opacity: 1;
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
}

              
            
!

JS

              
                  /* Demo purposes only */
  $(".hover").mouseleave(
    function () {
      $(this).removeClass("hover");
    }
  );
              
            
!
999px

Console