<section class="parallax-element-container">
  <div  class="parallax-object element" id="e1" data-speed="0.5">
    <img src="http://www.unsplash.it/500/500">
  </div>
  <div  class="parallax-object element" id="e2" data-speed="0.1">
    <h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2>
  </div>
  <div  class="parallax-object element" id="e3" data-speed="0.2">
    <img src="http://www.unsplash.it/500/500">
  </div>
  <div  class="parallax-object element" id="e4" data-speed="0.3">
    <h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2>
  </div>
  <div  class="parallax-object element" id="e5" data-speed="0.1">
    <img src="http://www.unsplash.it/500/500">
  </div>
  <div  class="parallax-object element" id="e6" data-speed="0.2">
    <h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2>
  </div>
  <div  class="parallax-object element" id="e7" data-speed="0.1">
    <img src="http://www.unsplash.it/500/500">
  </div>
  <div  class="parallax-object element" id="e8" data-speed="0.2">
    <h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2>
  </div>
  <div  class="parallax-object element" id="e9" data-speed="0.1">
    <img src="http://www.unsplash.it/500/500">
  </div>
</section>
* { margin: 0; padding: 0; }
html, body { font: normal 400 20px/1.5 'Roboto', sans-serif; }

.parallax-element-container { position: relative; height: 4500px; background-color: #333; }

.element { position: absolute; width: 300px; height: 300px; }

.element img { width: 100%; height: 100%; border-radius: 50%; }

.element h2 { color: #fff; }

#e1 { top: 200px; left: 10%; }
#e2 { top: 600px; right: 10%; }
#e3 { top: 1000px; left: 20%; }
#e4 { top: 1400px; right: 30%; }
#e5 { top: 1800px; left: 10%; }
#e6 { top: 2200px; left: 30%; }
#e7 { top: 2600px; right: 10%; }
#e8 { top: 3000px; left: 20%; }
#e9 { top: 3400px; right: 30%; }
jQuery(function($){
  
    $(window).on('load', function() {
        // PARALLAX FUNCTIN CALL
        $(".parallax-object").paralmax();

    });
  
});
/* ========================================================================= */
/* http://www.jksakura.com/paralmax */
/**
 * Paralmax is a JQuery responsive parallax plugin for multiple uses, including full size section background image, page parallax elements and more based on different use cases. With many built-in settings, users can set parallax speed, resize background image to full size or not, disable it below specific screen size, offset of the parallax element from it's center. The advantage of Paralmax is that it only adds parallax effet to elements, but not changes their style/looking, so users can easily customise/style any elements with pure HTML or CSS (position, size, image, background, content, etc).
 * @author Jake Zhong
----------------------  
-------------| |   / /
     | |     | |  / /
     | |     | | / /
     | |     | |/ /
     | |     | |\ \
     | |     | | \ \
     | |     | |  \ \
-----  |     | |   \ \
-----------------------
**/
/* ========================================================================= */	
jQuery.fn.extend({paralmax:function(){var t;return $(window).width(),t=$(window).height(),$(this).each(function(){function e(){s()?$(i).data("speed")||0===$(i).data("speed")?d.speed=$(i).data("speed"):d.speed=.5:d.speed=0}function a(){var e,a,r=i;!0===d.resizable&&($(window).width()>d.breakpoint?(e=parseInt($(r).parent().outerHeight()),a=parseInt($(r).parent().offset().top)>parseInt(t)?parseInt(t*d.speed):parseInt($(r).parent().offset().top)*d.speed,$(r).height(e+a)):$(r).height(e))}function r(){var t=i,e=$("html").scrollTop(),a=$("body").scrollTop(),r=(e>a?e:a)-d.start,n=parseInt(r*d.speed)+d.offset;$(t).css({webkitTransform:"translate3d(0, "+n+"px, 0)",MozTransform:"translate3d(0, "+n+"px, 0)",msTransform:"translateY("+n+"px)",OTransform:"translate3d(0, "+n+"px, 0)",transform:"translate3d(0, "+n+"px, 0)"})}function n(){if(!s()){var t=i;$(t).css({webkitTransform:"translate3d(0, 0, 0)",MozTransform:"translate3d(0, 0, 0)",msTransform:"translateY(0)",OTransform:"translate3d(0, 0, 0)",transform:"translate3d(0, 0, 0)"})}}function s(){return $(window).width()>d.breakpoint}var o,i=this,d={start:(o=$(i).offset()).top,stop:o.top+$(i).outerHeight(),speed:0,resizable:!!$(i).data("resize")&&$(i).data("resize"),breakpoint:$(i).data("breakpoint")?$(i).data("breakpoint"):0,offset:$(i).data("offset")?$(i).data("offset")*$(i).outerHeight():0};e(),a(),n(),s()&&r(),$(window).bind("scroll",function(){s()&&r()}),$(window).bind("resize",function(){e(),a(),n()})})}});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js