iphone - Web 应用程序中用于 Retina 显示的启动图像?

标签 iphone ios4 mobile-safari

有人知道如何让iOS在使用时显示更高分辨率的启动图像吗?目前,我只能使用 460x380 的图像,在 iPhone 4 的高 dpi 显示屏上显示时,该图像显然看起来很糟糕。我尝试了 @2x 技巧,但似乎不起作用。

有什么想法或解决方法吗?

最佳答案

我从来没有想过我会得到这个工作,但出于某种原因,网上到处都说高分辨率图像尺寸是 640x960,它们实际上是 640x920。当您进行此更改时,高分辨率启动屏幕将在视网膜显示屏上正确显示。以下是我在我们的应用程序中使用的确切代码。我们的启动画面适用于 iPad1/iPad2 纵向和横向、iPhone3/iPhone4

希望这对某人有帮助。

  <!-- iOS Device Startup Images -->
<!-- iPhone/iPod Touch Portrait – 320 x 460 (standard resolution) -->
<link rel="apple-touch-startup-image" href="splash-screen-320x460.png" media="screen and (max-device-width: 320px)" />

<!-- iPhone/iPod Touch Portrait – 640 x 920 pixels (high-resolution) -->
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="splash-screen-640x920.png" />

<!-- For iPad Landscape 1024x748 -->
  <!-- Note: iPad landscape startup image has to be exactly 748x1024 pixels (portrait, with contents rotated).-->
<link rel="apple-touch-startup-image" sizes="1024x748" href="splash-screen-1024x748.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />

<!-- For iPad Portrait 768x1004 -->
<link rel="apple-touch-startup-image" sizes="768x1004" href="splash-screen-768x1004.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)"/>

关于iphone - Web 应用程序中用于 Retina 显示的启动图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3707509/

相关文章:

iphone - iOS : cannot delete file

ios4 - MonoTouch 不稳定继续 : managed memory allocator crashes

ios - SecTrustEvaluate 总是返回 kSecTrustResultRecoverableTrustFailure 和 SecPolicyCreateSSL

javascript - 在 iphone 上使用 webkit-transform 和相对定位时如何修复慢速滚动

点击页面主体时 Android/iOS 输入聚焦

iphone - 为什么我的 XIB 文件无法本地化 (iPhone)?

ios - '>' 的 Swift String 重载行为

iphone - 如何让 UI 图像选择器 Controller 读取 iPhone 中的自定义源类型

events - UIButton在编码阶段的事件 Hook 内部修饰?

html - 移动 safari 上的输入占位符间距