我的问题是我的webapp的显示。我想使用谷歌驱动器托管我的webapp (j查询移动),所以我可以测试出来。我按照google drive的指示,将我的index.html、js文件夹和css文件夹上传到我的gdrive上的一个公共共享文件夹。只有当我直接从笔记本电脑上的google drive文件夹中加载index.html时,测试站点才能在iOS模拟器上显示良好。但是如果从web加载index.html,则页面看起来非常缩小(但其他功能)。网址:http://gdriv.es/whatname
我有viewport content="width=device-width, initial-scale=1, minimal-ui"jquery和jquery mobile js托管在CDN上,如果这是相关的。
我试过从另一个jquery移动网站复制所有文件,我在其他地方托管,我知道在iphone等上显示得很好-但有趣的是,它也显示这种缩小的行为在谷歌驱动器上…
您的问题不在您的文件中,viewport也是正确的。
不幸的是,你的内容显示在一个框架内,因此你的视口没有被考虑在内。框架被构建为覆盖可用空间,因此您无法看到它,除非您查看页面源代码。
你的最终页面是这样的:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>a title</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="GDrives whatname on Google Drive Site Publishing web hosting" />
<meta property="og:image" content="/logo.png" />
<link rel="shortcut icon" href="/favicon.ico" />
<script type="text/javascript">
// Here's google and yahoo analytics code
</script>
</head>
<frameset rows="100%">
<frame src="https://googledrive.com/host/0B5HUb04HaxoSWEtnMVI4TzBmZFk/" />
<noframes>
<body>
<p><a href="https://googledrive.com/host/0B5HUb04HaxoSWEtnMVI4TzBmZFk/">Go to Whatname on Google Drive Site Publishing web hosting</a></p>
</body>
</noframes>
</frameset>
</html>
你的内容链接在这里:
<frame src="https://googledrive.com/host/0B5HUb04HaxoSWEtnMVI4TzBmZFk/" />