iOS 7 iPad Safari Landscape innerHeight/outerHeight layout issue

后端 未结 13 906

We\'re seeing issues with a web app that has a height of 100% on Safari in iOS 7. It appears that the window.innerHeight (672px) doesn\'t match window.outerHeight (692px), b

13条回答
  •  独厮守ぢ
    2020-11-27 10:56

    Simple, cleaner CSS-Only solution:

    html {
         height: 100%;
         position: fixed;
         width: 100%;
       }
    

    iOS 7 seems to set the height correctly with this. Also there is no need for resize javascript events, etc. Since you are working with a full height app, it doesn't really matter if it is always position fixed.

提交回复
热议问题