Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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="snip1330"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample48.jpg" alt="sample48"/>
  <figcaption>
    <h2>Gustav Purpleson</h2>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1330 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample83.jpg" alt="sample83"/>
  <figcaption>
    <h2>Chauffina Carr</h2>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1330"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample31.jpg" alt="sample31"/>
  <figcaption>
    <h2>Parsley Montana</h2>
  </figcaption><a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Titillium+Web);
figure.snip1330 {
  font-family: 'Titillium Web', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  max-height: 220px;
  width: 100%;
  color: #ffffff;
  background-color: #000000;
}
figure.snip1330 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.9s ease;
  transition: all 0.9s ease;
}
figure.snip1330 img {
  opacity: 1;
  width: 100%;
  -webkit-transform: scale(1.1) translateX(3%);
  transform: scale(1.1) translateX(3%);
}
figure.snip1330:after,
figure.snip1330:before {
  -webkit-transition: all 0.9s 0s ease;
  transition: all 0.9s 0s ease;
  z-index: 1;
  content: '';
  position: absolute;
}
figure.snip1330:after {
  width: 0;
  height: 0;
  top: 25%;
  left: 50%;
  -webkit-transform: translate(-40%);
  transform: translate(-40%);
  border-style: solid;
  border-width: 150px 200px;
  border-color: transparent #20638f #20638f #184c6e;
}
figure.snip1330:before {
  bottom: -10%;
  left: 20%;
  background-color: #e67e22;
  height: 140px;
  width: 140px;
  border-radius: 50%;
  -webkit-transform: translate(-30%, 100%);
  transform: translate(-30%, 100%);
  -webkit-transform-origin: 0 300%;
  -ms-transform-origin: 0 300%;
  transform-origin: 0 300%;
}
figure.snip1330 figcaption {
  position: absolute;
  top: 0;
  left: 0;
}
figure.snip1330 h2 {
  margin: 0;
  opacity: 0;
  padding: 10px 20px;
  font-weight: 400;
  text-transform: uppercase;
  -webkit-transform: translateX(20%);
  transform: translateX(20%);
}
figure.snip1330 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 2;
}
figure.snip1330:hover img,
figure.snip1330.hover img {
  -webkit-transform: scale(1.1) translateX(-3%);
  transform: scale(1.1) translateX(-3%);
  opacity: 0.4;
}
figure.snip1330:hover:before,
figure.snip1330.hover:before {
  -webkit-transform: translate(0px, 0px);
  transform: translate(0px, 0px);
  background-color: #f39c12;
}
figure.snip1330:hover:after,
figure.snip1330.hover:after {
  -webkit-transform: translate(-60%);
  transform: translate(-60%);
}
figure.snip1330:hover figcaption h2,
figure.snip1330.hover figcaption h2 {
  opacity: 1;
  -webkit-transform: translateX(0px);
  transform: translateX(0px);
}

              
            
!

JS

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

              
            
!
999px

Console