backpax
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Backpax

Simple JavaScript Library to add parallax image to background-image

Install

$ npm install backpax --save

Demo

Demo page is here

Usage

If you want to add parallax effect to element's background-image

<div class="js-parallax parallax" 
  data-img="./path/to/default-image"
  data-img-768="./path/to/image-which-size-is-smaller-than-768"
  data-img-1024="./path/to/image-which-size-is-smaller-than-1024"
>
  <p>Hello world!</p>
</div>
import Backpax from 'backpax';

new Backpax('.js-parallax');

Readme

Keywords

Package Sidebar

Install

npm i backpax

Weekly Downloads

78

Version

1.0.8

License

MIT

Unpacked Size

3.79 MB

Total Files

28

Last publish

Collaborators

  • appleple