制作iPad网站,添加到主屏幕后删除浏览器? [英] Making a website for the iPad, removing the browser after adding to homescreen?

查看:264
本文介绍了制作iPad网站,添加到主屏幕后删除浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到如果你继续进行谷歌聊天,并且添加到主屏幕,一旦你从主屏幕打开它,浏览器就会消失,所有你看到的就是网站本身...我想知道google是如何管理的要做到这一点?这是我正在制作的网站,据称与iPad兼容。

I noticed that if you go on google chat, and "add to home screen", once you open it from home screen, the browser disappears and all you see is the website itself... I'm wondering how google managed to do that? this is for a website I am making that is supposedly compatible for the iPad.

推荐答案

将以下元标记添加到页面标题:

Add the following meta tag to the page's header:

<meta name="apple-mobile-web-app-capable" content="yes">

window.navigator.standalone boolean JavaScript属性将指示页面当前是否以全屏模式显示(如果从主屏幕图标启动,则仅显示全屏,而不是从Safari中访问)。

The window.navigator.standalone boolean JavaScript property will indicate whether the page is currently displayed in full-screen mode (it will only be displayed full-screen if launched from a home screen icon, not if visited from within Safari).

这篇关于制作iPad网站,添加到主屏幕后删除浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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