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="snip1357">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample14.jpg" alt="pr-sample14" />
  <figcaption>
    <div class="border one">
      <div></div>
    </div>
    <div class="border two">
      <div></div>
    </div>
    <h3>Ingredia Nutrisha</h3>
    <p>All this modern technology just makes people try to do everything at once.</p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1357 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample12.jpg" alt="pr-sample12" />
  <figcaption>
    <div class="border one">
      <div></div>
    </div>
    <div class="border two">
      <div></div>
    </div>
    <h3>Malcolm Function</h3>
    <p>Why can't I ever build character at a Miami condo or a casino somewhere? </p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1357"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample20.jpg" alt="pr-sample20" />
  <figcaption>
    <div class="border one">
      <div></div>
    </div>
    <div class="border two">
      <div></div>
    </div>
    <h3>Nathaneal Down</h3>
    <p>I think nighttime is dark so you can imagine your fears with less distraction. </p>
  </figcaption>
  <a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Ovo);
@import url(https://fonts.googleapis.com/css?family=Muli);
.snip1357 {
  font-family: 'Muli', Arial, sans-serif;
  position: relative;
  margin: 10px;
  padding: 0 0 0 20px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  box-shadow: none !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #ffffff;
  font-size: 16px;
}
.snip1357 * {
  -webkit-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}
.snip1357 img {
  max-width: 100%;
  vertical-align: top;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
.snip1357 .border {
  position: absolute;
  opacity: 0.45;
  z-index: 1;
}
.snip1357 .border:before,
.snip1357 .border:after,
.snip1357 .border div:before,
.snip1357 .border div:after {
  background-color: #f5b043;
  position: absolute;
  content: "";
  display: block;
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
}
.snip1357 .border:before,
.snip1357 .border:after {
  width: 0;
  height: 1px;
}
.snip1357 .border div:before,
.snip1357 .border div:after {
  width: 1px;
  height: 0;
}
.snip1357 .border.one {
  left: -6px;
  top: -6px;
  right: 6px;
  bottom: 6px;
}
.snip1357 .border.one:before,
.snip1357 .border.one div:before {
  left: 0;
  top: 0;
}
.snip1357 .border.one:after,
.snip1357 .border.one div:after {
  bottom: 0;
  right: 0;
}
.snip1357 .border.two {
  left: 6px;
  top: 6px;
  right: -6px;
  bottom: -6px;
}
.snip1357 .border.two:before,
.snip1357 .border.two div:before {
  right: 0;
  top: 0;
}
.snip1357 .border.two:after,
.snip1357 .border.two div:after {
  bottom: 0;
  left: 0;
}
.snip1357 figcaption {
  left: 0px;
  top: 20px;
  position: absolute;
  padding: 25px;
  margin: 6px;
  background-color: #000000;
  max-width: 70%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
.snip1357 h3,
.snip1357 p {
  margin: 0;
}
.snip1357 h3 {
  font-family: 'Ovo', Arial, sans-serif;
  font-weight: 400;
  font-size: 1.5em;
  margin-bottom: 5px;
}
.snip1357 p {
  line-height: 1.6em;
  letter-spacing: 1px;
  font-size: 0.9em;
}
.snip1357 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 1;
}
.snip1357:hover .border:before,
.snip1357.hover .border:before,
.snip1357:hover .border:after,
.snip1357.hover .border:after {
  width: 100%;
}
.snip1357:hover .border div:before,
.snip1357.hover .border div:before,
.snip1357:hover .border div:after,
.snip1357.hover .border div:after {
  height: 100%;
}

              
            
!

JS

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

              
            
!
999px

Console