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="snip1524">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample26.jpg" alt="sample26" />
  <figcaption>
    <h2>Quiche Hollandaise</h2>
    <p>Weekends don't count unless you spend them doing something completely pointless.</p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1524 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample27.jpg" alt="sample27" />
  <figcaption>
    <h2>Ingredia Nutrisha</h2>
    <p>A voice crackles in Calvin's radio: 'Enemy fighters at two o'clock!, 'Roger. What should I do until then?'</p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1524"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample28.jpg" alt="sample28" />
  <figcaption>
    <h2>Eric Widget</h2>
    <p>The only skills I have the patience to learn are those that have no real application in life. </p>
  </figcaption>
  <a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Josefin+Sans);
@import url(https://fonts.googleapis.com/css?family=Cardo);
figure.snip1524 {
  font-family: 'Josefin Sans', sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  background-color: #000000;
}

figure.snip1524 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.45s ease;
  transition: all 0.45s ease;
}

figure.snip1524 img {
  vertical-align: top;
  max-width: 100%;
  backface-visibility: hidden;
}

figure.snip1524 figcaption {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.75);
  border: 4px solid rgba(255, 255, 255, 0.05);
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
  -webkit-transform-origin: 0 0%;
  -ms-transform-origin: 0 0%;
  transform-origin: 0 0%;
}

figure.snip1524 h2,
figure.snip1524 p {
  line-height: 1.5em;
  margin: 0;
}

figure.snip1524 h2 {
  font-family: 'Cardo', serif;
  display: inline-block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

figure.snip1524 p {
  padding: 8px 0 15px;
}

figure.snip1524 a {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

figure.snip1524:hover > img,
figure.snip1524.hover > img {
  opacity: 0.2;
}

figure.snip1524:hover figcaption,
figure.snip1524.hover figcaption {
  -webkit-transform-origin: 100% 100%;
  -ms-transform-origin: 100% 100%;
  transform-origin: 100% 100%;
  -webkit-transform: rotate(0);
  transform: rotate(0);
}


              
            
!

JS

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

              
            
!
999px

Console