Creating a “sticky” fixed-position item that works on iOS Safari

后端 未结 5 1835
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 08:40

On iOS safari, one-finger panning doesn’t generate any events until the user stops panning. An onscroll event is only generated when the page stops moving and redrawn.

5条回答
  •  旧时难觅i
    2020-12-08 09:09

    If all you want is a sticky menu, you can save yourself some headaches by using an existing library. I've had success with iScroll:

    http://cubiq.org/iscroll

    At the very least, you can take a look at how this works and base your solution around that.

    Happy hacking!

提交回复
热议问题