iOS return bad value for window.innerHeight/Width

前端 未结 8 2056
悲哀的现实
悲哀的现实 2020-12-15 16:13

I\'m using window.innerHeight and window.innerWidth instructions to get the browser\'s available window size. It\'s working with firefox, safari (on a mac

8条回答
  •  心在旅途
    2020-12-15 16:30

    Check Apple's documentation on how to set the viewport for Mobile Safari, and how it scales: http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/UsingtheViewport/UsingtheViewport.html

    Basically, you can set a scale for the viewport, and make it default to whatever you want by setting a meta tag on your HTML page.

提交回复
热议问题