(真的)长的背景图片不呈现在iPad Safari上 [英] (Really) Long Background Image Does Not Render on iPad Safari

查看:361
本文介绍了(真的)长的背景图片不呈现在iPad Safari上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些未知原因,iPad Safari不显示真正长的背景图片。在 我的示例 中,背景图片为1,000 x 10,000像素。同一个示例适用于任何桌面浏览器,例如Safari,Firefox等。

For some unknown reasons, iPad Safari doesn't display a really long background image. In my example, the background image is 1,000 x 10,000 pixels. The same example works on any desktop browser e.g. Safari, Firefox, etc.

我知道CSS中的 background-repeat ,但不幸的是,

I am aware of the background-repeat in CSS but unfortunately it isn't applicable in my specific case.

推荐答案

移动Safari对子样本前显示的背景图片大小有限制,您可能会收到由于您背景的大小而遇到此问题:

Mobile Safari has limits to what size background images it will display before subsampling, you may be getting hit by this problem because of the size of your background:


解码的GIF,PNG和TIFF图片的最大尺寸为300万像素对于大于或等于256 MB RAM的设备,内存小于256 MB的设备和500万像素的设备。

The maximum size for decoded GIF, PNG, and TIFF images is 3 megapixels for devices with less than 256 MB RAM and 5 megapixels for devices with greater or equal than 256 MB RAM.

也就是说,对于内存小于256 MB的设备,请确保width * height≤3 * 1024 * 1024。注意,解码的大小远大于图像的编码大小。

That is, ensure that width * height ≤ 3 * 1024 * 1024 for devices with less than 256 MB RAM. Note that the decoded size is far larger than the encoded size of an image.

请参阅:了解iOS资源限制

这篇关于(真的)长的背景图片不呈现在iPad Safari上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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