Skip to content

nzamarreno/parallax-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallax-scroll ES6

Animation parallax on Scrool vertical using requestAnimationFrame and CSS3 3D transitions.

Properties

  • X: X axis translation (in pixels)
  • Y: Y axis translation (in pixels)
  • Z: Z axis translation (pixels)

Parameters

  • from-scroll: vertical scroll position the animation starts (default: when the element is visible)
  • distance: distance on vertical scroll position the animation will last (default: the window visible height)
  • to-scroll: vertical scroll position the animation ends (default: from-scroll + distance)
  • smoothness: factor that slowdown the animation, the more the smoothier (default: 30)

Exemple

    <div data-parallax='{"x": 650, "from-scroll": 90, "distance": 0}'>Number One</li>

About

Just a tiny library for parallax without JQuery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published