0

我们有一个使用以下 html 的客户站点。当我在桌面上的 Safari 浏览器中打开 URL 时,URL 页面会完全正确地呈现。当在 iPhone 中打开类似页面时,页面会缩小到 50% 的高度。

首先,我认为问题出在我们的代码上,但是当我们签入 iPhone 时,我们最后的代码按预期工作。

下面是 HTML。请求帮助。谢谢

<html>
  <head>
  <title>Test.com</title>
 </head>

<!-- frames -->
 <frameset>
    <frame name="test.com" src="http://www.google.com" marginwidth="0" marginheight="0"    scrolling="auto" frameborder="0"></frame>
</frameset>

4

1 回答 1

0

The problem is in the default viewport of the page.

Safari on iOS sets the size and scale of the viewport to reasonable defaults that work well for most webpages. The default width is 980 pixels. (source)

You will need to setup your own viewport. By setting a viewport the browser recognises how the content should fit on the device's screen.

Simply adding the following meta tag to your should fix your problem.

<meta name="viewport" content="initial-scale=1.0">

For more options and information on configuring the viewport visit http://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html

于 2013-08-15T11:26:07.663 回答