Minimalist Parallax Scroll Plugin With JavaScript – parallax.js

Category: Animation , Javascript | August 24, 2018
Author: cfs100
Views Total: 833
Official Page: Go to website
Last Update: August 24, 2018
License: MIT

Preview:

Minimalist Parallax Scroll Plugin With JavaScript – parallax.js

Description:

A minimalist JavaScript parallax plugin which applies a subtle parallax scroll effect to multiple elements within the document.

How to use it:

Add the class ‘parallax’ to the target elements and specify the parallax speed in the ‘data-speed’ attribute:

<div class="parallax el-1" data-speed="4"></div>
<div class="parallax el-2" data-speed="1"></div>
<div class="parallax el-3" data-speed="-2"></div>
...

Place the JavaScript file parallax.js at the end of the document.

<script src="parallax.js"></script>

Initialize the parallax plugin. That’s it.

var parallax = new Parallax('.parallax');

You Might Be Interested In:


Leave a Reply