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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                
<figure class="snip1410"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample77.jpg" alt="sample77"/>
  <figcaption>
    <h2>Hans Down</h2>
    <p>I'm looking for something that can deliver a 50-pound payload of snow on a small feminine target. Can you suggest something? Hello...? </p>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1410 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample47.jpg" alt="sample47"/>
  <figcaption>
    <h2>Desmond Eagle</h2>
    <p>I think nighttime is dark so you can imagine your fears with less distraction.</p>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1410"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample17.jpg" alt="sample17"/>
  <figcaption>
    <h2>Wisteria Widget</h2>
    <p>If you couldn't find any weirdness, maybe we'll just have to make some! </p>
  </figcaption><a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway);
@import url(https://fonts.googleapis.com/css?family=Julius+Sans+One);
.snip1410 {
  font-family: 'Raleway', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #ffffff;
  text-align: left;
  background-color: #ffffff;
  line-height: 1.4em;
  transform: translateZ(0);
}
.snip1410 *,
.snip1410 *:before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease-out;
  transition: all 0.35s ease-out;
}
.snip1410 img {
  max-width: 100%;
  vertical-align: top;
  -webkit-transition: all 0.8s ease-out;
  transition: all 0.8s ease-out;
}
.snip1410:before {
  background: #000000;
  position: absolute;
  content: '';
  -webkit-transition: all 0.35s ease-out;
  transition: all 0.35s ease-out;
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
  z-index: 1;
  bottom: 100%;
  top: 0;
  right: 0;
  left: 0;
  box-shadow: 0 0 40px white;
}
.snip1410 figcaption {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0;
  width: 100%;
  z-index: 2;
}
.snip1410 h2,
.snip1410 p {
  margin: 0;
  width: 100%;
  opacity: 0;
  padding: 25px;
}
.snip1410 h2 {
  font-family: 'Julius Sans One', Arial, sans-serif;
}
.snip1410 p {
  position: absolute;
  bottom: 0;
  padding-left: 60px;
  font-size: 0.8em;
  letter-spacing: 1px;
  text-align: right;
}
.snip1410 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 2;
}
.snip1410:hover img,
.snip1410.hover img {
  opacity: 0.2;
}
.snip1410:hover:before,
.snip1410.hover:before {
  bottom: 0;
  box-shadow: 0 0 0px white;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
}
.snip1410:hover figcaption h2,
.snip1410.hover figcaption h2,
.snip1410:hover figcaption p,
.snip1410.hover figcaption p {
  -webkit-transition-delay: 0.25s;
  transition-delay: 0.25s;
}
.snip1410:hover figcaption h2,
.snip1410.hover figcaption h2 {
  -webkit-transform: translateY(0%);
  transform: translateY(0%);
  opacity: 0.5;
}
.snip1410:hover figcaption p,
.snip1410.hover figcaption p {
  opacity: 0.7;
}

              
            
!

JS

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

              
            
!
999px

Console