dixonandmoe / rellax

Lightweight, vanilla javascript parallax library
https://dixonandmoe.com/rellax/
MIT License
7.06k stars 878 forks source link

Use .getBoundingClientRect().top instead of .offsetTop #178

Closed daltonrooney closed 4 years ago

daltonrooney commented 4 years ago

.offsetTop only calculates offset to the next relative parent, not the top of the page, which throws off calculations.

Ref #177