简体   繁体   English

网路上iPhone 6 Plus的图片

[英]Images for iPhone 6 Plus on the web

I'm pretty confused about generating images for the iPhone 6 Plus to make them look nice. 我很困惑为iPhone 6 Plus生成图像以使其看起来不错。 Any questions on this site about it seem to be about images for an iPhone app, but I'm wondering about using images on the web. 这个网站上关于它的任何问题似乎都与iPhone应用程序的图像有关,但我想知道如何在网络上使用图像。 It would be a lot easier if I had an actual iPhone 6 and 6 plus to test with. 如果我有实际的iPhone 6和6 plus进行测试,将会容易得多。

So, with the original iPhone, you upload an image to example.org and use it in your html. 因此,在原始iPhone上,您将图像上传到example.org并在html中使用。 No problem, the image looks good. 没问题,图像看起来不错。 Then the iPhone 4 comes out. 然后,iPhone 4上市了。 So you could simply make the image twice the size, and then scale it down with css so that it looks good on the retina device. 因此,您可以简单地将图像放大两倍,然后使用CSS缩小图像,以使其在视网膜设备上看起来不错。

Enter iPhone 6 and iPhone 6 Plus. 输入iPhone 6和iPhone 6 Plus。 From what I can gather, the iPhone 6 has the same resolution as the iPhone 4, so the above method would work, right? 据我所知,iPhone 6的分辨率与iPhone 4相同,因此上述方法可行,对吗?

Now the 6 Plus. 现在是6 Plus。 Looks like it 'renders at 3x' and then 'downsamples' to 1080 pixels. 看起来它“渲染为3倍”,然后“下采样”为1080像素。 How exactly does that work? 这是如何工作的?

Anyways, my biggest question: Will an image sized to @2x look fuzzy on an iPhone 6 Plus? 无论如何,我最大的问题是:在iPhone 6 Plus上,尺寸为@ 2x的图像看起来模糊吗? Let's say we have this: 假设我们有这个:

<img src="/img/sample.png" height="200" width="200">

If sample.png is 200x200, it will look fine on the original iPhone, and fuzzy on any retina devices. 如果sample.png为200x200,则在原始iPhone上看起来不错,在任何视网膜设备上都模糊。 If it's 400x400, it will look good on original iPhone and retina devices. 如果是400x400,则在原始iPhone和视网膜设备上看起来都不错。 But will it need to be 600x600 to look good on the iPhone 6 Plus? 但是,要在iPhone 6 Plus上看起来不错,是否需要为600x600?

您可以尝试调整图像的大小,具体取决于您所在设备上屏幕的大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM