Android browser's screen.width, screen.height & window.innerWidth & window.innerHeight are unreliable

后端 未结 8 1524
一个人的身影
一个人的身影 2020-12-05 02:53

I\'m working on a web app that is targeted to browsers on desktop, tablet and smartphone.

The web app has a light box implemented using Colorbox with an iframe

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 03:23

    On Android, window.outerWidth and window.outerHeight are reliably the screen size. Depending on your version of Android, innerWidth/Height is usually incorrect.

    Here's a really good writeup on the situation.

提交回复
热议问题