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

              
                <div class="l-card">
  <div class="l-thumbnail">
    <figure class="thumbnail-wrapper">
      <img src="http://commonsense-design.com/wp-content/uploads/2016/12/thumbnail_sample.png"/>
    </figure>
    <span class="more-text">
      Read More
    </span>
  </div>
  <div class="text-content">
    <h3 class="title">
      Lorem Ipsum
    </h3>
    <p class="caption">
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pulvinar ante diam, vitae accumsan sem ullamcorper…
    </p>
    <div class="content-meta">
      <span class="date">
        2016.12.12
      </span>
      <span class="like">
        <i class="material-icons">&#xE87E;</i>
        120
      </span>
    </div>
  </div>
</div>
              
            
!

CSS

              
                $color: #4cc48e;
* {
  box-sizing: border-box;
}
body {
  font-family: 'Open Sans';
  background: #fafafa;
}
.l-card {
  transition: 0.5s;
  overflow: hidden;
  width: 320px;
  padding: 0;
  margin: 24px auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.1);
  &:hover {
    .thumbnail-wrapper {
      &:after {
        transform: translate(0);
      }
      img {
        filter: grayscale(100%);
      }
    }  
    .more-text {
      opacity: 1;
    }
  }
}
.l-thumbnail {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  .more-text {
    transition: 0.5s;
    opacity: 0;
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    padding-top: 27.5%;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 18px;
    font-weight: lighter;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
  }
}
.thumbnail-wrapper {
  display: block;
  margin: 0;
  padding: 0;
  &:after {
    transition: 0.5s;
    content:"";
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    width: 100%;
    height: 100%;
    border-bottom: 12px solid $color;
  }
  img {
    transition: 0.5s;
    display: block;
    max-width: 100%;
  }
}
.text-content {
  padding: 16px;
  .title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: $color;
  }
  .caption {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #555;
    font-weight: lighter;
  }
}
.content-meta {
  overflow: hidden;
  width: 100%;
  font-size: 12px;
  .date {
    float: left;
    color: #aaa;
  }
  .like {
    display: inline-block;
    float: right;
    color: $color;
    .material-icons {
      vertical-align: middle;     
      font-size: 16px;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console