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="snip1107 blue"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample31.jpg" alt="sampl31"/>
  <figcaption>
    <div><span>Buy Now</span></div>
    <div>
      <h3>Winter Coats</h3>
    </div><a href="#"></a>
  </figcaption>
</figure>
<figure class="snip1107 red hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample48.jpg" alt="sample48"/>
  <figcaption>
    <div><span>Buy Now</span></div>
    <div>
      <h3>Sportwear</h3>
    </div><a href="#"></a>
  </figcaption>
</figure>
<figure class="snip1107 yellow"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample12.jpg" alt="sample12"/>
  <figcaption>
    <div><span>Buy Now</span></div>
    <div>
      <h3>Summer Jackets</h3>
    </div><a href="#"></a>
  </figcaption>
</figure>

              
            
!

CSS

              
                /* Included color classes.. 
	.red 
	.blue 
	.yellow 
	.navy
*/
@import url(https://fonts.googleapis.com/css?family=Raleway:400,800);
figure.snip1107 {
  font-family: 'Raleway', Arial, sans-serif;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  max-height: 220px;
  width: 100%;
  background: #000000;
  text-align: center;
}
figure.snip1107 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
}
figure.snip1107 img {
  opacity: 1;
  width: 100%;
  -webkit-transition: all 0.6s;
  transition: all 0.6s;
}
figure.snip1107 figcaption {
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  height: 100%;
}
figure.snip1107 figcaption > div {
  overflow: hidden;
  width: 100%;
  position: relative;
  height: 50%;
}
figure.snip1107 h3,
figure.snip1107 span {
  margin: 0;
  padding: 10px 15px;
  display: inline-block;
  width: 100%;
  font-weight: 800;
  text-transform: uppercase;
}
figure.snip1107 span {
  background: #ffffff;
  color: #4d4d4d;
  position: relative;
  bottom: 0;
  left: 0;
  position: absolute;
  -webkit-transform: translate3d(0%, 100%, 0);
  transform: translate3d(0%, 100%, 0);
}
figure.snip1107 h3 {
  background: #333333;
  -webkit-transform: translate3d(0%, 0%, 0);
  transform: translate3d(0%, 0%, 0);
}
figure.snip1107 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  color: #ffffff;
}
figure.snip1107.blue {
  background: #0a212f;
}
figure.snip1107.blue h3 {
  background: #2980b9;
}
figure.snip1107.red {
  background: #36100c;
}
figure.snip1107.red h3 {
  background: #c0392b;
}
figure.snip1107.yellow {
  background: #583804;
}
figure.snip1107.yellow h3 {
  background: #f39c12;
}
figure.snip1107.navy {
  background: #000000;
}
figure.snip1107.navy h3 {
  background: #34495e;
}
figure.snip1107:hover img,
figure.snip1107.hover img {
  opacity: 0.35;
  -webkit-filter: blur(5px);
  filter: blur(5px);
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}
figure.snip1107:hover figcaption span,
figure.snip1107.hover figcaption span {
  -webkit-transform: translate3d(0%, 0%, 0);
  transform: translate3d(0%, 0%, 0);
}
figure.snip1107:hover figcaption h3,
figure.snip1107.hover figcaption h3 {
  -webkit-transform: translate3d(0%, -100%, 0);
  transform: translate3d(0%, -100%, 0);
}


/* Demo purposes only */
html {
  height: 100%;
}
body {
  background-color: #212121;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: wrap;
  margin: 0;
  height: 100%;
}
              
            
!

JS

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

Console