/rd-parallax

Easy as hell parallax effect by monsters from templatemonster.com

Primary LanguageCSS

RD Parallax

It's a fork to resolve a viewport issue with Chrome from the original repo : https://github.com/TemplatemonsterPlugins/rd-parallax

Easy and Flexible multilayer parallax effect. Easy integration with other plugins.

Setup

The HTML markdown is really simple. Just create a set of layers that you want to move within your parallax scene giving each layer a class rd-parallax-layer and some additional data attributes.

<!-- RD Parallax -->
<section class="rd-parallax"></section>
  <!-- Creates a parallax media layer recalculating its height according to scene height -->
  <div class="rd-parallax-layer" data-speed="0.2" data-type="media" data-url="path/to/your-image.jpg"></div>
  <!-- Creates a static flow html layer -->
  <div class="rd-parallax-layer" data-speed="0.3" data-type="html" data-fade="true">
    <!-- Your static content goes here-->
  </div>
</section>
<!-- END RD Parallax-->

Note: You can use any content if you want for media layer, such as background videos etc. Just remove data-url attribute and put your content inside the media layer

Apply the parallax styles to the scene

<link rel="stylesheet" href="path/to/css/rd-parallax.css">

Finally, initialize the script

$(document).ready(function () {
    o.RDParallax({}); // Additional options
});

Further Customization

License

Licensed under dual CC By-SA 4.0 and GPLv3