隐藏在Chrome移动浏览器的地址栏(机器人) [英] hide mobile browser address bar on chrome (android)

查看:1458
本文介绍了隐藏在Chrome移动浏览器的地址栏(机器人)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个网站,在那里有一个简单的JavaScript

We have a site, where with a simple JavaScript

<body onLoad="setTimeout(function() {window.scrollTo(0, 1)}, 100);">

我们隐藏在大多数浏览器(Safari和Android原生浏览器)的地址栏这一行JavaScript的罚款最多的,但我们已经注意到了镀铬一个奇怪的现象,在网页确实向下滚动,但地址栏没有按躲起来!页面加载后,如果用户向下滚动用手指一点点,地址栏通常隐藏。

We hide the address bar on most browsers (safari, and the native android browser) this line of JavaScript works fine for most, but we have noticed a strange behavior on chrome, the page indeed scroll down, but the address bar doesn't hide! After the loading of the page, if the user scrolls down a little bit with the finger, the address bar hides normally.

我也试图向下滚动所有页面的JS,以饱满的滚动页面的结果,而地址栏仍是可见的...

I have also tried to scroll down all the page with the JS, with the result of the page full scrolled, and the address bar is still visible...

任何人都知道,如果有一些诀窍,我忘了用,如果此功能根本就不是present在Chrome浏览器?

Anyone knows if there is some trick I forgot to use, or if this function is simply not present in Chrome?

推荐答案

scrollTo(0,1)目前还不支持在Chrome浏览器Android版(这是最近加入,然后删除)。我们确实有全屏API,但是这是一个有点沉重递给你想达到什么。

scrollTo(0,1) is not yet supported in Chrome for Android (it was recently added and then removed). We do have the FullScreen API but that is a little heavy handed for what you want to achieve.

这篇关于隐藏在Chrome移动浏览器的地址栏(机器人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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