如何确定 Opera Mobile 中当前浏览器是否处于全屏模式
在 Javascript 中我们如何判断当前浏览器是否处于全屏模式?我可以依靠精确的宽度/高度比率来测量它吗?我希望得到 Opera Mobile 的这些信息,因为它在全屏显示时表现得很奇怪,它不会自动隐藏底部的小按钮,这意味着我的底部导航的一部分被隐藏了!
How in Javascript can we tell if the current browser is in fullscreen mode? is there an exact ratio of width/height i can depend on to measure this? Im hoping to have that info for Opera Mobile since it acts odd when it goes in full screen, it doesnt auto hide the small buttons at the bottom which means part of my bottom navigation is hidden away!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会检查用户的分辨率和视口是否在 30px 左右。测量全屏镶边并减去分辨率,看看视口尺寸是否相似。
这只是猜测,不可靠。
I would check whether the user's resolution and viewport are within 30px or so. Measure the full screen chrome and minus that from the resolution to see if the viewport size is similar.
That is just a guess and not reliable.