dixonandmoe / rellax

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

Efficiency Problem #238

Open Arturexe opened 2 years ago

Arturexe commented 2 years ago

Hello, I love your library! Recently I ran into some issues, when trying to mark too many elements for parallax scrolling. The issue is a pretty laggy parallax scroll. The more elements I mark, the larger the "scroll jumps" that JS performs with the elements. First I thought this was mainly related to the size of the marked objects, like large images. But it also seems to be a problem when I mark text paragraphs for parallax scrolling. I just tried to mark 6 sections for a scrolling website, each section with a heading and some paragraphs and I could see the lag, no images involved. The paragraphs involve linear gradient colored words inside span elements, which probably further adds to the load. Is there a fix for this?