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 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

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="snip1081 yellow"><i class="ion-ios-paw-outline"></i>
  <figcaption>
    <div class="header">
      <h2>Adventure</h2>
      <p>Mo - Fr 8.00 - 18.00<br/>Sa - Su 9.00 - 12.00</p>
    </div>
    <p>My family is dysfunctional and my parents won't empower me. Consequently I'm not self actualized.</p><a href="#"></a>
  </figcaption>
</figure>
<figure class="snip1081 red hover"><i class="ion-ios-people"></i>
  <figcaption>
    <div class="header">
      <h2>Night Life</h2>
      <p>Mo - Fr 8.00 - 18.00<br/>Sa - Su 9.00 - 12.00</p>
    </div>
    <p>That's the difference between me and the rest of the world! Happiness isn't good enough for me! I demand euphoria!</p><a href="#"></a>
  </figcaption>
</figure>
<figure class="snip1081 blue"><i class="ion-ios-camera-outline"></i>
  <figcaption>
    <div class="header">
      <h2>Day Trips</h2>
      <p>Mo - Fr 8.00 - 18.00<br/>Sa - Su 9.00 - 12.00</p>
    </div>
    <p>You know what we need, Hobbes? We need an attitude. Yeah, you can't be cool if you don't have an attitude.</p><a href="#"></a>
  </figcaption>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,500);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
figure.snip1081 {
  font-family: 'Raleway', Arial, sans-serif;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  width: 100%;
  text-align: center;
}
figure.snip1081 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.45s ease-in-out;
  transition: all 0.45s ease-in-out;
}
figure.snip1081 i {
  background-color: #1a1a1a;
  border-radius: 50%;
  color: #ffffff;
  display: inline-block;
  font-size: 40px;
  height: 70px;
  line-height: 70px;
  width: 70px;
  z-index: 1;
  border: 2px solid #ffffff;
}
figure.snip1081 figcaption {
  margin-top: -35px;
}
figure.snip1081 figcaption:after {
  border-radius: 0 0 8px 8px;
  width: 100%;
  background: #333333;
  height: 14px;
  display: block;
  content: '';
}
figure.snip1081 figcaption > p {
  font-weight: 500;
  background: #ffffff;
  color: #333333;
  padding: 30px 40px;
}
figure.snip1081 .header {
  border-radius: 8px 8px 0 0;
  padding: 50px 15px;
  background: #333333;
}
figure.snip1081 h2,
figure.snip1081 p {
  margin: 0;
}
figure.snip1081 p {
  font-size: 0.9em;
}
figure.snip1081 h2 {
  width: 100%;
  display: block;
  margin-bottom: 30px;
  letter-spacing: -1px;
  font-size: 30px;
  text-transform: uppercase;
  position: relative;
}
figure.snip1081 h2:after {
  background: #ededed none repeat scroll 0 0;
  content: "";
  height: 1px;
  left: 50%;
  margin-left: -30px;
  bottom: -12px;
  position: absolute;
  width: 60px;
}
figure.snip1081 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
}
figure.snip1081.blue i {
  background: #2980b9;
}
figure.snip1081.red i {
  background: #c0392b;
}
figure.snip1081.yellow i {
  background: #e67e22;
}
figure.snip1081.navy i {
  background: #34495e;
}
figure.snip1081:hover figcaption:after,
figure.snip1081.hover figcaption:after,
figure.snip1081:hover .header,
figure.snip1081.hover .header {
  background: #d65548;
}
figure.snip1081:hover i,
figure.snip1081.hover i {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}
figure.snip1081:hover.blue figcaption:after,
figure.snip1081.hover.blue figcaption:after,
figure.snip1081:hover.blue .header,
figure.snip1081.hover.blue .header {
  background: #164666;
}
figure.snip1081:hover.red figcaption:after,
figure.snip1081.hover.red figcaption:after,
figure.snip1081:hover.red .header,
figure.snip1081.hover.red .header {
  background: #6d2018;
}
figure.snip1081:hover.yellow figcaption:after,
figure.snip1081.hover.yellow figcaption:after,
figure.snip1081:hover.yellow .header,
figure.snip1081.hover.yellow .header {
  background: #924d10;
}
figure.snip1081:hover.navy figcaption:after,
figure.snip1081.hover.navy figcaption:after,
figure.snip1081:hover.navy .header,
figure.snip1081.hover.navy .header {
  background: #10161c;
}


/* 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