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="snip1314"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample13.jpg" alt="sample13"/>
  <div class="border one">
    <div></div>
  </div>
  <div class="border two">
    <div></div>
  </div>
  <figcaption>
    <blockquote>All this modern technology just makes people try to do everything at once.</blockquote>
    <h5>Indigo Violet<span>LittleSnippets</span></h5>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1314 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample96.jpg" alt="sample96"/>
  <div class="border one">
    <div></div>
  </div>
  <div class="border two">
    <div></div>
  </div>
  <figcaption>
    <blockquote>Why can't I ever build character at a Miami condo or a casino somewhere? </blockquote>
    <h5>Will Barrow<span>LittleSnippets</span></h5>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1314"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample92.jpg" alt="sample92"/>
  <div class="border one">
    <div></div>
  </div>
  <div class="border two">
    <div></div>
  </div>
  <figcaption>
    <blockquote>I think nighttime is dark so you can imagine your fears with less distraction. </blockquote>
    <h5>Lance Bogrol<span>LittleSnippets</span></h5>
  </figcaption><a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Ovo);
@import url(https://fonts.googleapis.com/css?family=Muli);
.snip1314 {
  font-family: 'Muli', Arial, sans-serif;
  position: relative;
  float: left;
  overflow: hidden;
  margin: 10px 1%;
  padding: 6px;
  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;
}
.snip1314 * {
  -webkit-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}
.snip1314 img {
  max-width: 100%;
  vertical-align: top;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
.snip1314 .border {
  position: absolute;
  opacity: 0.45;
  z-index: 1;
}
.snip1314 .border:before,
.snip1314 .border:after,
.snip1314 .border div:before,
.snip1314 .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;
}
.snip1314 .border:before,
.snip1314 .border:after {
  width: 0;
  height: 1px;
}
.snip1314 .border div:before,
.snip1314 .border div:after {
  width: 1px;
  height: 0;
}
.snip1314 .border.one {
  left: 0;
  top: 0;
  right: 12px;
  bottom: 12px;
}
.snip1314 .border.one:before,
.snip1314 .border.one div:before {
  left: 0;
  top: 0;
}
.snip1314 .border.one:after,
.snip1314 .border.one div:after {
  bottom: 0;
  right: 0;
}
.snip1314 .border.two {
  left: 12px;
  top: 12px;
  right: 0;
  bottom: 0;
}
.snip1314 .border.two:before,
.snip1314 .border.two div:before {
  right: 0;
  top: 0;
}
.snip1314 .border.two:after,
.snip1314 .border.two div:after {
  bottom: 0;
  left: 0;
}
.snip1314 figcaption {
  left: 6px;
  right: 6px;
  top: 6px;
  bottom: 6px;
  position: absolute;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.3);
}
.snip1314 blockquote {
  font-family: 'Ovo', Arial, sans-serif;
  font-size: 1.1em;
  font-weight: 500;
  line-height: 1.6em;
  font-style: italic;
  letter-spacing: 1px;
  padding: 0;
  margin: 0;
}
.snip1314 h5 {
  display: inline-block;
  font-size: 1em;
}
.snip1314 h5 span {
  font-weight: normal;
  margin-left: 5px;
  opacity: 0.5;
}
.snip1314 h5:before {
  content: '- ';
}
.snip1314 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 1;
}
.snip1314:hover .border:before,
.snip1314.hover .border:before,
.snip1314:hover .border:after,
.snip1314.hover .border:after {
  width: 100%;
}
.snip1314:hover .border div:before,
.snip1314.hover .border div:before,
.snip1314:hover .border div:after,
.snip1314.hover .border div:after {
  height: 100%;
}
.snip1314:hover figcaption,
.snip1314.hover figcaption {
  opacity: 0.9;
  background-color: #000000;
}
/* Demo purposes only */
body {
  background-color: #212121;
}

              
            
!

JS

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

              
            
!
999px

Console