Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 699 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 699 Bytes

parascroll.js

Parascroll.js provides a simple parallax image scroller that can be easily incorporated into any website. It is perfect for backgrounds on "hero"-style elements, but can be used on any element with a background.

Usage

To mark an element for the parallax effect, simply add the class "parallax-bg" and the attribute "data-bgurl," like so:

<div class="parallax-bg" data-bgurl="path/to/image.png">...</div>

Once you include the script at the bottom of your file, it will automatically set up parallax scrolling. Note that any elements added dynamically will not be affected.

Demonstration

Once I set up the Github Pages site for parascroll.js, I will link it here.