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="snip1191 blue">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample66.jpg" alt="sample66" />
  <figcaption>
    <h3>Indigo Violet</h3><span>Read More</span>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1191 red hover">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample67.jpg" alt="sample67" />
  <figcaption>
    <h3>Gunther Beard</h3><span>Read More</span>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1191 orange">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample69.jpg" alt="sample69" />
  <figcaption>
    <h3>Dylan Meringue</h3><span>Read More</span>
  </figcaption>
  <a href="#"></a>
</figure>
              
            
!

CSS

              
                /* Included color classes.. 
	.red 
	.blue 
	.orange
*/
/* Icon set - http://ionicons.com/ */

@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
@import url(https://fonts.googleapis.com/css?family=Raleway:400,800);
figure.snip1191 {
  font-family: 'Raleway', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  max-height: 310px;
  width: 100%;
  background: #000000;
  color: #333;
  text-align: left;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

figure.snip1191 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  transition: all 0.35s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}

figure.snip1191 img {
  max-width: 100%;
  vertical-align: top;
}

figure.snip1191 figcaption {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

figure.snip1191 h3 {
  position: absolute;
  top: 0;
  text-transform: uppercase;
  padding: 0px 25px;
  line-height: 44px;
  margin: 0;
  left: 0;
  font-weight: 400;
  background-color: #000000;
  color: #ffffff;
}

figure.snip1191 h3:before {
  position: absolute;
  left: 100%;
  border-style: solid;
  border-width: 44px 12px 0 0;
  border-color: #000000 transparent transparent;
  content: '';
  top: 0;
}

figure.snip1191 span {
  position: absolute;
  bottom: 0;
  right: 0;
  color: #ffffff;
  background-color: #000000;
  padding: 0 10px;
  margin-right: -1px;
  line-height: 40px;
  font-size: 0.9em;
  font-weight: 800;
  text-transform: uppercase;
  -webkit-transform: translateX(120%);
  transform: translateX(120%);
}

figure.snip1191 span:before {
  position: absolute;
  right: 100%;
  border-style: solid;
  border-width: 0 0 40px 12px;
  border-color: transparent transparent #000000;
  content: '';
  top: 0;
}

figure.snip1191 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
}

figure.snip1191.blue {
  background-color: #2472a4;
}

figure.snip1191.blue h3,
figure.snip1191.blue span {
  background-color: #2472a4;
}

figure.snip1191.blue span:before {
  border-color: transparent transparent #2472a4;
}

figure.snip1191.blue h3:before {
  border-color: #2472a4 transparent transparent;
}

figure.snip1191.red {
  background-color: #ab3326;
}

figure.snip1191.red h3,
figure.snip1191.red span {
  background-color: #ab3326;
}

figure.snip1191.red span:before {
  border-color: transparent transparent #ab3326;
}

figure.snip1191.red h3:before {
  border-color: #ab3326 transparent transparent;
}

figure.snip1191.orange {
  background-color: #d67118;
}

figure.snip1191.orange h3,
figure.snip1191.orange span {
  background-color: #d67118;
}

figure.snip1191.orange span:before {
  border-color: transparent transparent #d67118;
}

figure.snip1191.orange h3:before {
  border-color: #d67118 transparent transparent;
}

figure.snip1191:hover img,
figure.snip1191.hover img {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

figure.snip1191:hover span,
figure.snip1191.hover span {
  -webkit-transform: translateX(0);
  transform: translateX(0);
}
              
            
!

JS

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

Console