cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <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>
            
          
!
            
              $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 {
        opacity: 1;
      }
    }
    .more-text {
      opacity: 1;
    }
  }
}
.l-thumbnail {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  .more-text {
    transition: 0.5s;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    padding: 6px 12px 8px;
    color: #fff;
    font-size: 14px;
    font-weight: lighter;   
    line-height: 1;
    letter-spacing: 1px;
    border: 1px solid #fff;
    opacity: 0;
  }
}
.thumbnail-wrapper {
  display: block;
  margin: 0;
  padding: 0;
  &:after {
    transition: 0.5s;
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
  }
  img {
    display: block;
    max-width: 100%;
  }
}
.thumbnail-over {
  transition: 0.5s;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%; 
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  
}
.text-content {
  padding: 16px;
  .title {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: $color;
    font-weight: bold;
  }
  .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;
    }
  }
}
            
          
!
999px
Loading ..................

Console