如何确定 Opera Mobile 中当前浏览器是否处于全屏模式

发布于 2024-09-11 11:56:51 字数 136 浏览 3 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

画离情绘悲伤 2024-09-18 11:56:51

我会检查用户的分辨率和视口是否在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文