Scrolling iframe on iOS is solved, BUT the iframe page display incomplete

后端 未结 4 571
无人共我
无人共我 2021-02-06 09:24

I am trying to scroll an iframe on iOS, and I succeeded, it\'s scrolling well, reference:

http://home.jejaju.com/play/iframe-scroll.html

http://areaaperta.com/ni

4条回答
  •  时光说笑
    2021-02-06 10:15

    This solution is a bit of a hack, but is tested and works fine on iOS:

    Basically, since scrolling works fine in a DIV, you embed your page code using the object tag. The problem is, due to the same origin policy, you can't determine your target page's dimensions. I found that setting a huge page size is perfectly workable (no delay or choppyness noticed...just blank space)

    You can easily determine the client OS and only add this code to iOS devices.

提交回复
热议问题