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

              
                <figure class="snip1373">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample67.jpg" alt="sample67" />
  <figcaption>
    <h2>Giles Posture</h2>
    <p>Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. </p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1373 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample99.jpg" alt="sample99" />
  <figcaption>
    <h2>Desmond Eagle</h2>
    <p>I don't understand this! Not a single part of my horoscope came true! ... The paper should print Mom's daily predictions. Those sure come true.</p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1373"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample66.jpg" alt="sample66" />
  <figcaption>
    <h2>Richard Tea</h2>
    <p>Given that sooner or later we're all just going to die, what's the point of learning about integers?</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);
.snip1373 {
  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);
}
.snip1373 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease-out;
  transition: all 0.35s ease-out;
}
.snip1373 img {
  max-width: 100%;
  vertical-align: top;
  -webkit-transition: all 0.8s ease-out;
  transition: all 0.8s ease-out;
}
.snip1373: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;
  top: 0;
  bottom: 0;
  left: 0;
  right: 100%;
  box-shadow: 0 0 40px white;
}
.snip1373 figcaption {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0;
  width: 100%;
  z-index: 2;
}
.snip1373 h2,
.snip1373 p {
  margin: 0;
  width: 100%;
  opacity: 0;
  padding: 25px;
}
.snip1373 h2 {
  font-family: 'Julius Sans One', Arial, sans-serif;
}
.snip1373 p {
  position: absolute;
  bottom: 0;
  padding-left: 60px;
  font-size: 0.8em;
  letter-spacing: 1px;
  text-align: right;
}
.snip1373 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 2;
}
.snip1373:hover img,
.snip1373.hover img {
  opacity: 0.2;
}
.snip1373:hover:before,
.snip1373.hover:before {
  right: 0;
  box-shadow: 0 0 0px white;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
}
.snip1373:hover figcaption h2,
.snip1373.hover figcaption h2,
.snip1373:hover figcaption p,
.snip1373.hover figcaption p {
  -webkit-transition-delay: 0.25s;
  transition-delay: 0.25s;
}
.snip1373:hover figcaption h2,
.snip1373.hover figcaption h2 {
  -webkit-transform: translateY(0%);
  transform: translateY(0%);
  opacity: 0.5;
}
.snip1373:hover figcaption p,
.snip1373.hover figcaption p {
  opacity: 0.7;
}
              
            
!

JS

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

              
            
!
999px

Console