iPad 和iPad 2 渲染 CSS 的方式不同?

发布于 2024-12-23 10:25:22 字数 559 浏览 1 评论 0原文

我有一个非常困惑的问题。我正在开发的网站在 iPad、带有 iPad 用户代理的桌面 Safari 和 iPhone 上看起来都很好。换句话说,大多数设备都带有 Mobile Webkit。

但不知何故,它在 iPad 2 上看起来有所不同。以下是差异:

iPad 1

iPad 2

===

正如您所看到的,布局在 iPad 2 上的中心列中以某种方式中断。

您可以通过以下网址查看:new.studyusa.com

请注意,据我所知,两台 iPad 均运行 iOS 5.0.1。我想不出还有什么要检查的。

显然,最好的帮助就是给出可能解释这一问题的答案。但从你的 iPad 上检查这一点并让我知道出现哪一个几乎同样有帮助,因为我只能在每种型号的其中一个上进行测试。

谢谢。

I have a very perplexing problem. A site I'm developing looks fine on iPad, desktop Safari with the iPad user agent, and iPhone. In other words, most devices with Mobile Webkit.

Somehow, though, it looks different on iPad 2. Here are the differences:

iPad 1

iPad 2

===

So as you can see, the layout somehow breaks on the iPad 2 in that center column.

You can check it with this URL: new.studyusa.com

Please note, as far as I know, both iPads are running iOS 5.0.1. I couldn't think of anything else to check.

Obviously, the best help would be a response with what could possibly account for this. But it would be almost as helpful to check this from your iPad and let me know which comes up, as I've only been able to test this on one of each model.

Thanks.

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

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

发布评论

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

评论(1

染年凉城似染瑾 2024-12-30 10:25:22

好的。这确实很尴尬,但事实证明 iPad2 版本运行的是 iOS 4.3.3,而在该 iOS 版本和 iOS 5(布局正确的版本)之间,Mobile Safari 渲染引擎改变了一件非常重要的事情

: iPad 2 屏幕截图中的第一个标题是 h1,第二个标题是 h2h2 的结束标记是 h1。所以情况如下:

<h1></h1>
<h2></h1>

然后 iOS 4.3.3 并没有将 h2 视为已关闭,因此以下

被视为h2

注意:我回答这个问题只是因为我希望如果有人犯了像我这样的愚蠢错误,他们会发现这个。

Okay. This is really embarrassing, but it turns out that the iPad2 version was on iOS 4.3.3, and somewhere between that iOS version and iOS 5 (the one with the correct layout), the Mobile Safari rendering engine changed a pretty important thing:

The first headline in the screenshot for iPad 2 is an h1 and the second is an h2. The closing tag for the h2 was h1. So it was as follows:

<h1></h1>
<h2></h1>

Then iOS 4.3.3 didn't treat the h2 as being closed, and therefore the following <div>s were treated as part of the h2.

Note: I only answered this because I hope that if someone makes a stupid error like mine, they find this.

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