css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!--From https://www.sitepoint.com/scroll-based-animations-jquery-css3/ -->
<div class="main-container">
  <div class="container">
    <h1>Slide in from the left </h1>
    <p>This animation will focus on sliding an element from the left once it enters the view of the user</p>
  </div>
  <div class="container">
    <h2>
 Our Testimonials <i class="fa fa-comment"></i></h2>
    <p> We have worked in the industry for 15 years and have provided services to a wide range of clients.</p>
    <p>Come and see what our clients are saying about our services. </p>
  </div>
  <div class="container cf">
    <!-- testimonial one -->
    <div class="animation-element slide-left testimonial">
      <div class="header">
        <div class="left">
          <img src="https://drive.google.com/uc?export=download&id=0B7UPM0QugWUjVTdZcktRTWhNamM" />
        </div>
        <div class="right">
          <h3>Johnathon Richard Smith</h3>
          <h4>CEO / Manager - Auto Incorporated</h4>
        </div>
      </div>
      <div class="content"><i class="fa fa-quote-left"></i> When I started using their service I was skeptical. They promised me a 300% return on my initial investment. However they came through on their word and now my business is flourishing.. <i class="fa fa-quote-right"></i></div>
      <div class="rating">
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star-o"></i>
      </div>
    </div>
    <!--testimonial two -->
    <div class="animation-element slide-left testimonial">
      <div class="header">
        <div class="left">
          <img src="https://drive.google.com/uc?export=download&id=0B7UPM0QugWUjV3BseTMtcEU1T2M" />
        </div>
        <div class="right">
          <h3>Joanna Hammerlton</h3>
          <h4>Marketing Manager - Omega Creative</h4>
        </div>
      </div>
      <div class="content"><i class="fa fa-quote-left"></i> Our company first enlisted their services when we had a down-turn in sales and revene. They outlined a series of steps we could take to improve our position and within a year we are making signifcant improvements..
        <i class="fa fa-quote-right"></i>
      </div>
      <div class="rating">
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star-o"></i>
      </div>
    </div>
    <!--testimonial three -->
    <div class="animation-element slide-right testimonial">
      <div class="header">
        <div class="left">
          <img src="https://drive.google.com/uc?export=download&id=0B7UPM0QugWUjTURta0pyMEtoUmc
" />
        </div>
        <div class="right">
          <h3>Mark Jamerson</h3>
          <h4>CEO - Generic Business</h4>
        </div>
      </div>
      <div class="content"><i class="fa fa-quote-left"></i> We entered into a 12 month period of service with this company in the hopes to improve our returns. After this period we have a return of double our initial investment..
        <i class="fa fa-quote-right"></i>
      </div>
      <div class="rating">
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
      </div>
    </div>
    <!--testimonial four -->
    <div class="animation-element slide-right testimonial one-shot">
      <div class="header">
        <div class="left">
          <img src="https://drive.google.com/uc?export=download&id=0B7UPM0QugWUjb1dxcGZEYUc0Z3M" />
        </div>
        <div class="right">
          <h3>Susan Hilton</h3>
          <h4>Financial Officer - People Tech</h4>
        </div>
      </div>
      <div class="content"><i class="fa fa-quote-left"></i> Our involvement in this company has been mutually beneficial. We were hoping for slightly higher returns, however the current level of returns are sufficient..
        <i class="fa fa-quote-right"></i>
      </div>
      <div class="rating">
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star-o"></i>
        <i class="fa fa-star-o"></i>
      </div>
    </div>
  </div>
  
  <!-- testimonial 5 -->
     <div class="animation-element slide-up testimonial">
      <div class="header">
        <div class="left">
          <img src="https://drive.google.com/uc?export=download&id=0B7UPM0QugWUjVTdZcktRTWhNamM" />
        </div>
        <div class="right">
          <h3>Johnathon Richard Smith</h3>
          <h4>CEO / Manager - Auto Incorporated</h4>
        </div>
      </div>
      <div class="content"><i class="fa fa-quote-left"></i> When I started using their service I was skeptical. They promised me a 300% return on my initial investment. However they came through on their word and now my business is flourishing.. <i class="fa fa-quote-right"></i></div>
      <div class="rating">
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star-o"></i>
      </div>
    </div>
    <!--testimonial six -->
    <div class="animation-element slide-up testimonial">
      <div class="header">
        <div class="left">
          <img src="https://drive.google.com/uc?export=download&id=0B7UPM0QugWUjV3BseTMtcEU1T2M" />
        </div>
        <div class="right">
          <h3>Joanna Hammerlton</h3>
          <h4>Marketing Manager - Omega Creative</h4>
        </div>
      </div>
      <div class="content"><i class="fa fa-quote-left"></i> Our company first enlisted their services when we had a down-turn in sales and revene. They outlined a series of steps we could take to improve our position and within a year we are making signifcant improvements..
        <i class="fa fa-quote-right"></i>
      </div>
      <div class="rating">
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star"></i>
        <i class="fa fa-star-o"></i>
      </div>
    </div>
  
            
          
!
            
              /*These styles contain basic styles for fomatting along with our animation css*/

body {
  font-size: 16px;
  font-family: monospace;
  font-weight: 400;
  background: #efefef;
  line-height: 170%;
  padding: 20px;
}

/*animation element*/
.animation-element {
  opacity: 0;
}

/*animation element sliding left*/
.animation-element.slide-left {
  opacity: 0;
  transition: all 500ms linear;
  transform: translate3d(-100px, 0px, 0px);
}

.animation-element.slide-left.in-view {
  opacity: 1;
  transform: translate3d(0px, 0px, 0px);
}

.animation-element.slide-right {
  opacity: 0;
  transition: all 500ms linear;
  transform: translate3d(100px, 0, 0);
}

.animation-element.slide-right.in-view {
  opacity: 1;
  transform: translate3d(0px, 0px, 0px);
}

.animation-element.slide-up {
  opacity: 0;
  transition: all 500ms linear;
  transform: translate3d(0, 100px, 0);
}

.animation-element.slide-up.in-view {
  opacity: 1;
  transform: translate3d(0px, 0px, 0px);
}








/*EXTRANEOUS STYLES BELOW HERE -- animation slide left styled for testimonials*/









.animation-element.slide-left.testimonial, .animation-element.slide-right.testimonial, .animation-element.slide-up.testimonial {
  margin: 0% 1.5% 3% 1.5%;
  background: #F5F5F5;
  padding: 15px;
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
  border: solid 1px #EAEAEA;
}
.animation-element.slide-left.testimonial:hover,
.animation-element.slide-left.testimonial:active{
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.25);
}


.animation-element.slide-left.testimonial .header{
  float: left;
  width: 100%;
  margin-bottom: 10px;
}
.animation-element.slide-left.testimonial .left{
  float: left;
  margin-right: 15px;
}
.animation-element.slide-left.testimonial .right{
  float: left;
}

.animation-element.slide-left.testimonial img {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  box-shadow: 0px 1px 3px rgba(51, 51, 51, 0.5);
}

.animation-element.slide-left.testimonial h3 {
  margin: 0px 0px 5px 0px;
}

.animation-element.slide-left.testimonial h4 {
  margin: 0px 0px 5px 0px;
}

.animation-element.slide-left.testimonial .content {
  float: left;
  width:100%;
  margin-bottom: 10px;
}

.animation-element.slide-left.testimonial .rating{}

.animation-element.slide-left.testimonial i {
  color: #aaa;
  margin-right: 5px;
}


            
          
!
            
              var $animation_elements = $('.animation-element');
var $window = $(window);

function check_if_in_view() {
  var window_height = $window.height();
  var window_top_position = $window.scrollTop();
  var window_bottom_position = (window_top_position + window_height);
 
  $.each($animation_elements, function() {
    var $element = $(this);
    var element_height = $element.outerHeight();
    var element_top_position = $element.offset().top;
    var element_bottom_position = (element_top_position + element_height);
 
    //check to see if this current container is within viewport
    if ((element_bottom_position >= window_top_position) &&
        (element_top_position <= window_bottom_position)) {
      $element.addClass('in-view');
    } else {
      $element.removeClass('in-view');
    }
  });
}

$window.on('scroll resize', check_if_in_view);
$window.trigger('scroll');
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console