iPad 浏览器中的网站被锁定?

发布于 2024-12-22 00:50:31 字数 632 浏览 3 评论 0原文

我注意到在 http://twitter.comhttp://www.linkedin.com,当使用 safari 在 Ipad 中打开时,页面的宽度被锁定到窗口,因此即使您尝试水平滚动它也不会移动,而在我的网站上,框架会移动,露出灰色 背景。

有谁知道上面列出的页面是如何做到这一点的。

我正在使用:

<meta name="viewport" content="width=1024, initial-scale=1.0, maximum-scale=2.0">

作为控制某些属性的方式,但尚未发现锁定/阻止页面从左向右移动的方法。垂直滚动当然是完美的。

只是为了澄清一下,该页面没有水平滚动条,因为它固定为 1024px 并且居中,尽管如此,当您使用手指从左到右移动它时,反之亦然,它会移动整个窗口,后面显示灰色。找出页面如何阻止这种情况发生将会很棒。

谢谢大家,我很感激,这在tinterwebs上很难找到,对于其他想做同样事情的人来说应该派上用场。 :D

//贾尔斯

I notice that on sites such as http://twitter.com and http://www.linkedin.com, when opened in an Ipad using safari, the page's width is locked to the window so even if you try to scroll horizontally it will not budge, whereas on my site the frame will move, revealing a grey background.

Does anyone know how the pages listed above do this.

I am using the:

<meta name="viewport" content="width=1024, initial-scale=1.0, maximum-scale=2.0">

as the way to control some properties but have yet to discover the way to lock/prevent the page from being able to move from left to right. vertical scrolling is perfect ofcourse.

Just to clarify, the page doesnt have a horiz scroll bar as it is fixed to 1024px and is centered, never-the-less, when you use your finger and move it from left to right or vice versa it will move the entire window and show grey behind it. It will be great to find out how pages stop that from happening.

Thanks guys and I appreciate it, once again this is hard to find on the tinterwebs and should come in handy for others who want to do the same. :D

//Giles

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文