【发布时间】:2011-10-06 22:26:33
【问题描述】:
我将我的 jquery 包含切换到最新版本,现在我的网站在 android 和 iphone 上都像 PC 网站一样显示。
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" />
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script>
到
<link href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
现任负责人
<!DOCTYPE html>
<html>
<head>
<title></title>
<link href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
有什么想法吗?
解决方案
我添加了<meta content="width=device-width,minimum-scale=1,maximum-scale=1" name="viewport">.,现在可以了。
【问题讨论】:
-
你的解决方案确实是正确的;最新版本的 jQM 删除了 alpha 中的默认视口设置。为什么不将您的解决方案添加为答案并接受它?你可以这样做。
标签: jquery jquery-mobile