Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <figure class="snip1343">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample30.jpg" alt="sq-sample30" />
  <h3>Max Conversion</h3>
  <figcaption>
    <p>Weekends don't count unless you spend them doing something completely pointless. </p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1343 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample31.jpg" alt="sq-sample31" />
  <h3>Jason Response</h3>
  <figcaption>
    <p>Sometimes one should just look at things and think about things without doing things. </p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1343"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample35.jpg" alt="sq-sample35" />
  <h3>Parsley Montana</h3>
  <figcaption>
    <p>My family is dysfunctional and my parents won't empower me. Consequently I'm not self actualized.</p>
  </figcaption>
  <a href="#"></a>
</figure>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Roboto:300,400);
.snip1343 {
  font-family: 'Roboto', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #ffffff;
  line-height: 1.4em;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.snip1343 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
}
.snip1343 img {
  opacity: 1;
  width: 100%;
  vertical-align: top;
}
.snip1343 h3 {
  position: absolute;
  top: 0%;
  width: 100%;
  background-color: #1e1e1e;
  z-index: 1;
  text-align: right;
  padding: 15px 25px 0px;
  margin: 0;
  font-weight: 300;
  font-size: 1.3em;
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
}
.snip1343 h3:before {
  position: absolute;
  content: '';
  top: 100%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 315px 55px 0;
  border-color: transparent #1e1e1e transparent transparent;
}
.snip1343 figcaption {
  padding: 5px 25px 25px;
  position: absolute;
  width: 100%;
  z-index: 2;
  bottom: 0%;
  background-color: #141414;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
}
.snip1343 figcaption:before {
  position: absolute;
  content: '';
  bottom: 100%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 55px 0 0 315px;
  border-color: transparent transparent transparent #141414;
}
.snip1343 p {
  margin: 0;
  padding: 0;
  font-size: 0.8em;
  letter-spacing: 1px;
  opacity: 0.8;
}
.snip1343 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 2;
}
.snip1343:hover h3,
.snip1343.hover h3,
.snip1343:hover figcaption,
.snip1343.hover figcaption {
  -webkit-transform: translateY(0%);
  transform: translateY(0%);
}

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

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console