code3z / scrolljs

Parallax Superpowers in under 1KB of Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scroll.js

Turn CSS animations into cool (and useful) parallax effects.

More documentation coming soon. See demo.html for an example.

Usage

Simply add the JavaScript to your site, and add the class scrolljs to any elements you want to effect. Then, for the elements you want to animate, add the data-range attribute like so:

<div class="scrolljs" data-range="0to100">Hello world</div>

A single number in data-range is based on the value of the window's height. Scrolljs will recalculate this on resize.

How it works

About

Parallax Superpowers in under 1KB of Code

License:The Unlicense


Languages

Language:JavaScript 50.3%Language:HTML 49.7%