Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12141

How to change the value of "transform: translateY" depending on the page scroll direction?

$
0
0

I have a table whose contents appear smoothly as I scroll down and up. Additionally, I added

transform: translateY 

to it so that the table contents slightly move towards the center of the screen. When scrolling down everything works fine, but the problem occurs when scrolling up. I would like the content to move down then, but unfortunately it also moves up. How to "fix it"?

https://jsfiddle.net/dpmf0uac/

I tried using Chat-GPT, but it didn't help me at all. He destroyed the whole table even more. I "talked" with him for several hours and he sent so many different scripts that I can't even remember which ones were "better". Thanks in advance and best regards ^^


Viewing all articles
Browse latest Browse all 12141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>