I know how to implement a sticky header in a PC browser. However, on mobile devices, the scroll event behaves truly online. It only starts once after the window has stopped scrolling, so I cannot control "window.scrollTop" in real time.
I also tried position: sticky, but this was only supported on iOS8 and above.
So what is the right way to create a sticky title for mobile browsers? Any ideas appreciated, thanks ~
source
share