iframe on iOS (iPad) content cropping issue

后端 未结 3 789
我寻月下人不归
我寻月下人不归 2020-12-28 23:34

I\'m looking for the correct way to assure that dynamically revealed content is visible after scrolling in an iframe on ipad / iOS5.

Oh Iframes and iPad - w

3条回答
  •  旧时难觅i
    2020-12-29 00:10

    I'm assuming there is a bug in iOS safari in how it treats iframes with defined width / height. Without width / height being defined it tries to scale them automatically to fit their content without any scrolling needed.

    The best workaround I've found is to not scroll the iframe at all, but rather to scroll a wrapper div inside the framed-in page.

    Here's an example:

    
    

    a-file.html:

    
    
    
    ...all my normal content...

提交回复
热议问题