用于Retina显示的webapp中的启动图像? [英] Startup image in webapp for Retina display?

查看:85
本文介绍了用于Retina显示的webapp中的启动图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Anybody know how to get iOS to display higher resolution startup image when using ? Currently I'm stuck with 460x380 image which obviously looks horrible when displayed on iPhone 4's high dpi display. I tried the @2x trick but didn't seem to work.

任何想法或解决方法?

推荐答案

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

I didn't ever think I would get this working, but for some reason, everywhere online states that the hi-res images dimensions are 640x960, they are actually 640x920. When you make this change, the hi-res splash screen will appear correctly on retina displays. Below is the exact code that I use in our app. We have splash screens working on iPad1/iPad2 Portrait and Landscape, 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)"/>

这篇关于用于Retina显示的webapp中的启动图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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