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="snip1173 red">
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample69.jpg" alt="sample69"/>
  <figcaption>
    <h3>Ingredia<span>Nutrisha</span></h3>
    <a href="#"><i class="ion-ios-star-outline"></i></a>
  </figcaption>
</figure>
<figure class="snip1173 blue hover">
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample58.jpg" alt="sample58"/>
  <figcaption>
    <h3>Carnegie <span>Mondover</span></h3>
    <a href="#"><i class="ion-ios-cloud-download-outline"></i></a>
  </figcaption>
</figure>
<figure class="snip1173 yellow">
	<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample59.jpg" alt="sample59"/>
  <figcaption>
    <h3>Gordon <span>Norman</span></h3>
    <a href="#"><i class="ion-ios-plus-outline"></i></a>
  </figcaption>
</figure>
              
            
!

CSS

              
                /* Icon set - http://ionicons.com/ */
@import url(https://fonts.googleapis.com/css?family=Raleway:400);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
figure.snip1173 {
  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;
  color: #ffffff;
  text-align: center;
}
figure.snip1173 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
}
figure.snip1173 img {
  opacity: 1;
  width: 100%;
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}
figure.snip1173 figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
figure.snip1173 figcaption:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background-color: #000000;
  -webkit-transform: translate3d(0%, 100%, 0);
  transform: translate3d(0%, 100%, 0);
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
}
figure.snip1173 h3 {
  margin: 0;
  position: absolute;
  width: 100%;
  left: 0;
  padding: 15px 30px 0;
  display: inline-block;
  font-weight: 400;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.8);
  top: 0;
  -webkit-transform: translate3d(0%, -160%, 0);
  transform: translate3d(0%, -160%, 0);
}
figure.snip1173 h3:after {
  position: absolute;
  left: 0;
  border-style: solid;
  border-width: 20px 155px 0 155px;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
  content: '';
  top: 100%;
}
figure.snip1173 h3 span {
  font-weight: 800;
}
figure.snip1173 a {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
figure.snip1173 i {
  position: absolute;
  font-size: 52px;
  color: #ffffff;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -20%);
  transform: translate(-50%, -20%);
  opacity: 0;
}
figure.snip1173.blue h3 {
  background-color: #2472a4;
}
figure.snip1173.blue h3:after {
  border-color: #2472a4 transparent transparent transparent;
}
figure.snip1173.blue figcaption:after {
  background-color: #2472a4;
}
figure.snip1173.yellow h3 {
  background-color: #e08e0b;
}
figure.snip1173.yellow h3:after {
  border-color: #e08e0b transparent transparent transparent;
}
figure.snip1173.yellow figcaption:after {
  background-color: #e08e0b;
}
figure.snip1173.green h3 {
  background-color: #229955;
}
figure.snip1173.green h3:after {
  border-color: #229955 transparent transparent transparent;
}
figure.snip1173.green figcaption:after {
  background-color: #229955;
}
figure.snip1173.navy h3 {
  background-color: #2b3c4e;
}
figure.snip1173.navy h3:after {
  border-color: #2b3c4e transparent transparent transparent;
}
figure.snip1173.navy figcaption:after {
  background-color: #2b3c4e;
}
figure.snip1173.red h3 {
  background-color: #ab3326;
}
figure.snip1173.red h3:after {
  border-color: #ab3326 transparent transparent transparent;
}
figure.snip1173.red figcaption:after {
  background-color: #ab3326;
}
figure.snip1173:hover img,
figure.snip1173.hover img {
  opacity: 0.3;
  -webkit-transform: scale(1);
  transform: scale(1);
}
figure.snip1173:hover h3,
figure.snip1173.hover h3,
figure.snip1173:hover figcaption:after,
figure.snip1173.hover figcaption:after {
  -webkit-transform: translate3d(0%, 0%, 0);
  transform: translate3d(0%, 0%, 0);
}
figure.snip1173:hover i,
figure.snip1173.hover i {
  opacity: 0.9;
}
              
            
!

JS

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

Console