如何为iphone5设置apple-touch-startup-image? [英] how to set apple-touch-startup-image for iphone5?

查看:176
本文介绍了如何为iphone5设置apple-touch-startup-image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过

<link href="Images/Default-568h@2x.png" sizes="640x1136" media="(device-width: 640px) and (device-height: 1136px)" rel="apple-touch-startup-image">

但它不起作用。苹果的界面guildline尚未针对iphone5进行更新。

But it didn't work. And apple's interface guildline hasn't been updated for iphone5.

有人知道吗?谢谢!

推荐答案

1.不要在视口中使用width = device-width,请使用以下代码:

1.Don't use "width=device-width" for viewport, use codes below:

<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">

2.准备一张640 * 1096的图片,另存为Images / Default-568h @ 2x ,将此代码添加到您网页的标题中:

2.Prepare an image sized 640*1096, save as "Images/Default-568h@2x", add this code to your page's header:

<link href="Images/Default-568h@2x.png" rel="apple-touch-startup-image" sizes="640x1096">

这是一个演示,它与iPhone5兼容:
https://github.com/openfibers/php-tot

Here's a demo, it's compatible with iPhone5: https://github.com/openfibers/php-tot

这篇关于如何为iphone5设置apple-touch-startup-image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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