“iPad 上的 Safari”之间的已知差异列表和“iPhone 上的 Safari”

发布于 2024-10-03 00:55:00 字数 540 浏览 0 评论 0原文

我的网站在 iPhone 上看起来完美,但在 iPad 上看起来不太理想。我在查找有关 iPad 的 webkit/safari 渲染引擎和 iPhone 的 webkit/safari 渲染引擎之间差异的信息时遇到了很多麻烦。

如果您不相信我,请在 iPhone 和 PC 上访问 http://www.finishline.com iPad(请注意,如果您被转到我们的移动网站,则必须单击页面底部的“标准网站”)。主要区别是缺少白色背景和顶部的主选项卡式导航菜单(右上角的小迷你推车也很远)。

iPhone(看起来正确): alt text

iPad(看起来不对): alt text

iPhone 和 iPad 上的移动 webkit 之间的渲染差异是什么?

My website looks perfect on the iPhone but looks sub-optimal on the iPad. I'm having a lot of trouble finding information on the differences between iPad's webkit/safari rendering engine and iPhones' webkit/safari rendering engine.

If you don't believe me, go to http://www.finishline.com on both the iPhone and the iPad (note that you will have to click "standard site" at the bottom of the page if you get thrown over to our Mobile site). The main differences being a missing white background and the main tabbed navigation menu at the top (also the little mini-cart up at the top right is way off).

iPhone (looks correct):
alt text

iPad (looks wrong):
alt text

What are the rendering differences between mobile webkit on iPhone and iPad?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧伤慢歌 2024-10-10 00:55:00

iPhone 和 iPad 使用相同的渲染引擎 WebKit。

这些平台之间唯一明显的区别可能是:

  • 如果网站上的字体大小以像素为单位指定,则视网膜显示屏的较高 DPI 计数可能会对文本缩放产生一些影响,但我可能是错的。始终以磅为单位指定字体大小。
  • 两种设备的屏幕尺寸不同。不是按照像素,而是按照物理尺寸。 WebKit(或一般的 iOS)试图通过调整字体大小来弥补这一点,使其在适合页面的同时可读。这可能会导致文档重新流动;导致断行。

对于这种情况,除了检查页面布局之外,我真的无法提出任何其他建议。使用 W3C 的工具对其进行验证,并在模拟器中以及更重要的是在设备上对其进行正确测试。

从上面看起来,一些 CSS hack(例如使其在 IE 上工作)可能会产生这样的效果。或者是杂线断线。

一般来说,您不必担心这两个平台或一般平台之间的差异。使用干净的 CSS 和 HTML 并在所有目标设备上进行测试,直到看起来正常为止。尽量避免使用 CSS/HTML hacks 来使 IE6 正常工作。根据我的经验,这是问题的根本原因之一。

据我所知,这些设备之间没有“重大”差异,除了屏幕尺寸(以及可能使用的 WebKit/iOS 版本 - 比如说 iOS 3.x 与 iOS 4.2)。

如果您可以访问 Xcode,请尝试使用不同版本的 iOS 查看该网站,看看是否存在问题。

无论哪种情况。修复您的 HTML 和 CSS。该问题的原因可能非常简单。

iPhone and iPad use the same rendering engine, WebKit.

The only obvious differences between those platforms might be:

  • If font sizes on the site are specified in pixels, the retina display's higher DPI count might have some effect on text scaling, but I might be wrong. Always specify the font sizes in points.
  • Screen sizes of both devices are different. Not in terms of pixels, but in terms of physical size. This is something WebKit (or iOS in general) tries to compensate for by resizing fonts to make them readable while still fit on the page. This might lead to re-flowing the document; causing line-breaks.

For this case I can't really suggest anything else than checking your page layout. Validating it using W3C's tools and testing it properly in both Simulator and more importantly, on the devices.

From what it looks above, some CSS hacks (to make it work on IE for instance) might have an effect like this. Or a stray line break.

Generally, you shouldn't worry about differences between these two platforms, or platforms in general. Use clean CSS and HTML and test it on all target devices until it looks properly. Try to avoid using CSS/HTML hacks to make IE6 work. This is one of the root causes of problems from my experience.

As far as I know, there are no "major" differences between these devices, except for their screen size (and possibly the used WebKit/iOS version -- let's say iOS 3.x vs. iOS 4.2).

If you have access to Xcode, try to look at the site from different versions of iOS to see if that's the problem.

In either case. Fix your HTML and CSS. The problem might have a very simple cause.

半夏半凉 2024-10-10 00:55:00

您的 iPad 可能运行 iOS 3.2(或 4.2 测试版),而您的 iPhone 至少运行 iOS 4.0。这比平台之间的差异更重要(平台之间不应该有任何差异)。

我认为您在要求差异列表时找错了树 - 您可以访问 http://trac.webkit .org/ 并获得两个版本之间的补丁和错误修复的详尽列表,但是使用普通的 CSS 故障排除技术(即主要是尝试和错误)来找出您的网站的情况会更快导致它在 iOS 3.2 中陷入混乱。

Your iPad is probably running iOS 3.2 (or a beta of 4.2) while your iPhone is running at least iOS 4.0. That's more important than the differences between the platforms (of which there aren't supposed to be any).

I think you're barking up the wrong tree asking for a list of differences - you can go to http://trac.webkit.org/ and get an exhaustive list of patches and bug fixes between the two versions, but it's going to be quicker to just use normal CSS troubleshooting techniques (i.e. mostly trial and error) to figure out what about your site is causing it to mess up in iOS 3.2.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文