问题
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