locomotivemtl / locomotive-scroll

🛤 Detection of elements in viewport & smooth scrolling with parallax.
https://locomotivemtl.github.io/locomotive-scroll
MIT License
7.84k stars 1.12k forks source link

Some elements disappear #435

Open esterfrontend opened 2 years ago

esterfrontend commented 2 years ago

Hello 👋

Describe the bug When scroll down some elements disappear and they suddenly appear when scrolling up.

Screenshots Youtube video to see the trouble on chrome. https://www.youtube.com/watch?v=Tfuvsa-64f8

Desktop:

I could fix it on Chrome using:

.has-scroll-smooth [data-scroll-container] {
    transform: perspective(1px);
}

This fix is not working in firefox.

Thank you 👊

naptestdev commented 2 years ago

This trick works well for me

[data-scroll-container] {
  perspective: 999999px !important;
}
esterfrontend commented 2 years ago

It is not working on Firefox

BleXor commented 2 years ago

Was playing with GSAP and Locomotive - had the same issue - while scrolling up, elements (images) were invisible, unless I scrolled them like 70% into view .. This fixed the issue for me in my little demo:

[data-scroll-container], [data-scroll-section] { transform-style: preserve-3d; will-change: transform; }

Venegrad commented 2 years ago

Thank u, u guys my bro )

QuintonC commented 2 years ago

Was playing with GSAP and Locomotive - had the same issue - while scrolling up, elements (images) were invisible, unless I scrolled them like 70% into view .. This fixed the issue for me in my little demo:

[data-scroll-container], [data-scroll-section] { transform-style: preserve-3d; will-change: transform; }

This worked for us. Thanks! :)

mariosever commented 1 year ago

This worked for me: html.has-scroll-smooth { overflow: hidden; /* fix */ position: fixed; left: 0; right: 0; top: 0; bottom: 0; }

hys25 commented 1 year ago

Thank you for the suggestion, perspective(1px) works!

akimlyubchenko commented 1 year ago

This worked for me: html.has-scroll-smooth { overflow: hidden; /* fix */ position: fixed; left: 0; right: 0; top: 0; bottom: 0; }

thanks. fixed