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 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

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

              
                <figure class="snip1453">
  <figcaption>
    <h2>Parsley Montana</h2>
    <p>You don't get to be mom if you can't fix everything just right.</p>
  </figcaption>
  <a href="#"></a><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample90.jpg" alt="sample90" />
</figure>
<figure class="snip1453 hover">
  <figcaption>
    <h2>Indigo Violet</h2>
    <p>Until you stalk and overrun, you can't devour anyone.</p>
  </figcaption>
  <a href="#"></a><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample71.jpg" alt="sample71" />
</figure>
<figure class="snip1453">
  <figcaption>
    <h2>Fig Nelson</h2>
    <p>There's never enough time to do all the nothing you want.</p>
  </figcaption>
  <a href="#"></a><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample47.jpg" alt="sample47" />
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Playfair+Display);
@import url(https://fonts.googleapis.com/css?family=Fauna+One);
figure.snip1453 {
  font-family: 'Fauna One', Arial, sans-serif;
  position: relative;
  margin: 10px 20px;
  min-width: 230px;
  max-width: 295px;
  min-height: 215px;
  width: 100%;
  color: #ffffff;
  text-align: left;
  line-height: 1.4em;
  background-color: #1a1a1a;
  font-size: 16px;
}
figure.snip1453 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}
figure.snip1453 img {
  position: absolute;
  left: 0%;
  top: 50%;
  opacity: 1;
  width: 100%;
  -webkit-transform: translate(0%, -50%);
  transform: translate(0%, -50%);
}
figure.snip1453 figcaption {
  position: absolute;
  width: 50%;
  top: 50%;
  right: 0;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  padding: 20px 20px 20px 0;
}
figure.snip1453 h2,
figure.snip1453 p {
  margin: 0;
  width: 100%;
  -webkit-transform: translateX(-20px);
  transform: translateX(-20px);
  opacity: 0;
}
figure.snip1453 h2 {
  font-family: 'Playfair Display', Arial, sans-serif;
  text-transform: uppercase;
  margin-bottom: 5px;
}
figure.snip1453 p {
  font-size: 0.8em;
}
figure.snip1453 a {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}
figure.snip1453:hover img,
figure.snip1453.hover img {
  width: 55%;
  left: -10%;
}
figure.snip1453:hover figcaption h2,
figure.snip1453.hover figcaption h2,
figure.snip1453:hover figcaption p,
figure.snip1453.hover figcaption p {
  -webkit-transform: translateX(0px);
  transform: translateX(0px);
  opacity: 1;
}
              
            
!

JS

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

              
            
!
999px

Console