全屏 api HTML5 和 Safari (iOS 6) [英] Full screen api HTML5 and Safari (iOS 6)

查看:28
本文介绍了全屏 api HTML5 和 Safari (iOS 6)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使应用程序在 iOS 6 的 Safari 中以全屏模式(没有顶部栏)运行.代码如下:

I'm trying to make an application to run in full screen mode (without the top bar) in Safari for iOS 6. The code is as follows:

var elem = document.getElementById("element_id");
if (elem.requestFullScreen) {
  elem.requestFullScreen();
} else if (elem.mozRequestFullScreen) {
  elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullScreen) {
  elem.webkitRequestFullScreen();
}

它在桌面浏览器上运行良好.但在 Mobile Safari (iOS) 6 中不起作用.

It works well on desktop browsers. But in Mobile Safari (iOS) 6 does not work.

对这个问题有什么想法吗?

Any idea about this issue?

推荐答案

不支持...

http://caniuse.com/fullscreen

这篇关于全屏 api HTML5 和 Safari (iOS 6)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆