Fullscreen via Javascript on Chrome for Android (tablets)

风格不统一 提交于 2019-12-18 14:59:34

问题


I would like to have my web app hide the browser tabs and address bar on Chrome on mobile. document.documentElement.requestFullScreen() seems to have no effect. window.scroll(0,1) doesn't work either on tablets.

If possible, I'd also love a good solution for Chrome and/or Safari on iOS.

Any ideas? I'm on Chrome 29 for Android.


回答1:


Check this sample: here

try to use webkitRequestFullscreen()

Also "Lowercased the "S" in requestFullscreen() and changed document.webkitCancelFullScreen() to document.webkitExitFullscreen(). Updated browser compatibility comment." via Let-Your-Content-Do-the-Talking-Fullscreen-API



来源:https://stackoverflow.com/questions/18966923/fullscreen-via-javascript-on-chrome-for-android-tablets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!