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="parent--el">
  <div class="is-item has-content">
    <div class="is-item--inner">
      <h2 class="section-title"><span>Cool Plates</span></h2>
      <div class="is-content">
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum fuga nihil nobis harum atque eius!</p>
      </div>
      <p class="cta">Read More</p>
    </div>
  </div>
  
  <div class="is-item has--img">
    
    <div class="the--display">
      <figure class="plate first-plate">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/602471/plateone.png" alt="">
     </figure>
      <figure class="plate second-plate">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/602471/platetwo.png" alt="">
      </figure> 
    </div>
    <div class="is-img--content">
      <div class="is-img--content_inner">
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem perferendis accusantium corrupti sapiente at doloremque dolores a hic, culpa, nulla voluptates, debitis repellendus eum aut distinctio sequi facere molestiae adipisci?</p>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorem perferendis accusantium corrupti sapiente at doloremque dolores a hic, culpa, nulla voluptates, debitis repellendus eum aut distinctio sequi facere molestiae adipisci?</p>
      </div>
    </div>
    <div class="bg"></div>
  </div>
</div>
            
          
!
            
              $yellow: #ffe787;
$lato: "Lato", sans-serif;
$easingMain: cubic-bezier(0.68, 0.11, 0.66, 0.27);
body {
  font-family: $lato;
  line-height: 1.6;
  margin-top: 3em;
}
h2 {
  font-size: 3.5em;
  margin: 0;
  text-align: left;
  position: relative;
  transform: translateX(50%);
  transition: all 400ms ease;
}
.cta {
  display: inline-block;
  color: #999;
  text-decoration: none;
}
.is-item--inner {
  position: relative;
  right: 0em;
}
.parent--el {
  max-width: 900px;
  margin: auto;
  display: flex;
  align-items: center;
}

figure {
  margin: 0;
}
.is-item {
  width: 40%;
  padding: 6em 0em;
}

// left side
.has-content {
  position: relative;
  z-index: 4;
}
.section-title {
  overflow: hidden;
  position: relative;
  margin: 0;

  span {
    display: inline-block;
    transform: translateY(100%);
    position: relative;
    transition: transform 400ms ease-in-out;
  }
}
.is-content {
  overflow: hidden;
  position: relative;
  p {
    position: relative;
    opacity: 0;
    transition: all 500ms ease;
    transform: translateY(30%);
  }
}

.cta {
  opacity: 0;
  transition: all 500ms ease;
  transform: translateY(30%);
  cursor: pointer;
}

// right side
.has--img {
  width: 60%;
  position: relative;
}

.bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: $yellow;
  transition: all 600ms $easingMain;
}

.the--display {
  display: flex;
  max-width: 60%;
  margin: auto;
  position: relative;
  z-index: 6;
}
.plate {
  width: 100%;

  img {
    width: 100%;
    transform: translateY(20px);
    transition: all 500ms ease-in-out;
    opacity: 0;
  }
}

.first-plate {
  img {
    position: relative;
    right: -1em;
  }
}

.second-plate {
  img {
    position: relative;
    left: -1em;
  }
}

// on load transitions
.is-active {
  .bg {
    width: 100%;
    transition-delay: 300ms;
  }
  .section-title {
    span {
      transition-delay: 600ms;
      transform: translateY(0%);
    }
  }
  .is-content {
    p {
      opacity: 1;
      transition-delay: 1000ms;
      transform: translateY(0%);
    }
  }
  .cta {
    opacity: 1;
    transition-delay: 1200ms;
    transform: translateY(0%);
  }
  .plate {
    img {
      transition-delay: 600ms;
      transform: translateY(0px);
      opacity: 1;
    }
  }

  .second-plate {
    img {
      transition-delay: 700ms;
    }
  }
}

.is-img--content {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  visibility: hidden;
}
.is-img--content_inner {
  padding: 0em 1em;

  p {
    transform: translateY(30px);
    position: relative;
    opacity: 0;
    transition: all 600ms ease;
  }
}

// read more transitions
.is-reading {
  .bg {
    width: 0%;
    left: auto;
    right: 0;
    transition-delay: 400ms;
  }
  h2 {
    font-size: 2.3em;
    margin: 0;
    position: relative;
    transform: translateX(0);
    transition-delay: 300ms;
    transition: all 400ms ease;
  }
  .plate {
    img {
      transition-delay: 00ms;
      transform: translateY(20px);
      opacity: 0;
      visibility: hidden;
    }

    &.second-plate {
      img {
        transition-delay: 100ms;
      }
    }
  }
  .is-img--content {
    visibility: visible;
  }
  .is-img--content_inner {
    padding: 0em 1em;

    p {
      transform: translateY(0px);
      position: relative;
      opacity: 1;
      transition-delay: 800ms;

      &:nth-child(2) {
        transition-delay: 900ms;
      }
    }
  }
}

            
          
!
            
              let body = document.getElementsByTagName("body")[0];
let $cta = document.querySelector(".cta");

const initDraw = () => {
  body.classList.add("is-active");
};

const initReading = e => {
  let $t = e.target;
  body.classList.toggle("is-reading");

  if (body.classList.contains("is-reading")) {
    $t.innerHTML = "Show Images";
  } else {
    $t.innerHTML = "Read More";
  }
};

$cta.addEventListener("click", initReading);

window.onload = initDraw;

            
          
!
999px
Loading ..................

Console