0.0.1 • Published 7 years ago

el-parallax v0.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

el-parallax

tool for making parallax of elements

Installation

$ npm install el-parallax

Usage

import elParallax from 'el-parallax'
const el = document.querySelector('#el');
elParallax(el);

or

elParallax({
    element: el,
    perspective: true,
    multiple: 0.01
})

or

const el1 = document.querySelector('#el1');
const el2 = document.querySelector('#el2');
elParallax([{
    element: el1,
    perspective: false,
    multiple: 0.01
}, {
    element: el2,
    perspective: false,
    multiple: 0.04
}])