IPAD 是否有等效的 apple-touch-startup-image?
对于网络应用程序,您可以使用 apple-touch-startup-image 设置启动屏幕,
那么对于 iPad 来说呢?
For web apps you can set the startup screen with apple-touch-startup-image
What about for iPads?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我也遇到了同样的问题...您需要使用 1004*768 的特定尺寸。我在这个博客中解释了这一点:http://www.amirnaor.com/?p=71
I had the same issue as well... You need to you use a specific size of 1004*768. i explained it in this blog: http://www.amirnaor.com/?p=71
这将为您的 Web 应用程序添加一个启动屏幕。以下是 iPad 和 iPhone/iPod Touch 以及 iPhone 5 所需的尺寸。其中也包括状态栏区域。
如果创建兼容 iPad 的 Web 应用程序,建议同时使用横向和纵向尺寸。
This will add a Splash Screen to your Web App. Below are the sizes you’ll need for both iPad and iPhone/iPod Touch, and iPhone 5. These include the status bar area as well.
If creating a Web App for iPad compatibility it’s recommended that both Landscape and Portrait sizes are used.
肖像图像需要为 768x1004(注意:1004,而不是 1024,20px 用于状态栏),PNG 是首选文件格式。
横向图像需要为 1024x748(注意:748,状态栏同样为 20px)。然后需要将该图像顺时针旋转 90 度,最终结果为 748x1024。
标题中的链接标签需要如下所示:
对于新的 Retina iPad(如果您不添加这些,它将使用上面的像素加倍):
发布时的先前答案(包括接受的答案)没有配合我的测试。
Portrait image needs to be 768x1004 (note: 1004, not 1024, 20px is for status bar), PNG is the preferred file format.
Landscape image needs to be 1024x748 (note: 748, again 20px for status bar). This image then needs to be rotated 90 degrees clockwise, end result is 748x1024.
Link tags in header need to be as follows:
For the new Retina iPad (if you don't add these, it will use the above with pixel doubling):
Previous answers (including the accepted answer) at time of posting this didn't work with my testing.
我认为 Madhup 指的是用 Objective C 编写并用 xcode 编译的本机应用程序。
OP 正在尝试使其适用于通过 safari 添加到主屏幕的网络应用程序。
到目前为止还没有让它工作:(
I think Madhup is referring to native apps written in objective c and compiled with xcode.
The OP is trying to make it work for webapps that are added to the homescreen via safari.
Haven't gotten it to work so far :(
我只是通过制作尺寸为 748x1024 的 PNG 图像来使启动图像正常工作。这是在固件为 3.2.1 的 iPad 上进行测试的。
I only got the startup image to work by making a PNG image with dimensions of 748x1024. This was tested on an iPad with firmware 3.2.1.
我能找到的这个问题的最佳解释: https://gist.github.com/472519
请注意只有当我为 iPhone 提供启动图像以及为 iPad 提供横向/纵向图像时,它才对我有用。
The best explanation of this issue I could find: https://gist.github.com/472519
Note that it only worked for me once I provided a startup image for iPhone and both landscape/portrait for iPad.
从我今天的测试来看,iPad 似乎不支持 apple-touch-startup-image。令人相当失望的是,iPhone 在 OS 3.1 中确实支持此功能,而 iPad 则不支持。此外,在无铬浏览器中使用网络应用程序时,视口设置不正确。
我确实相信这两者都是 iPad OS 3.2 中的错误或遗漏。太糟糕了 :(
我确实在苹果论坛上提出了要求: https://devforums.apple.com/thread/47178< /a>
From my testing today, it seems the iPad doesn't support the apple-touch-startup-image. It's quite disappointing that the iPhone does support this in OS 3.1, and the iPad doesn't. Also, when using a webapp in a chromeless browser, the viewport isn't set properly.
I do believe both are bugs or omissions in the iPad OS 3.2. Too bad :(
I did ask for it at the apple forums: https://devforums.apple.com/thread/47178
这和iphone是一样的。将名为
Default.png
的 png 放入资源文件夹中。It's the same as the iphone. Put a png named
Default.png
in the resource folder.