【问题标题】:JQUERYMobile Site Showing Up Wide like PC versionJQUERYMobile 网站像 PC 版一样显示广泛
【发布时间】: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>

有什么想法吗?

解决方案

我添加了&lt;meta content="width=device-width,minimum-scale=1,maximum-scale=1" name="viewport"&gt;.,现在可以了。

【问题讨论】:

  • 你的解决方案确实是正确的;最新版本的 jQM 删除了 alpha 中的默认视口设置。为什么不将您的解决方案添加为答案并接受它?你可以这样做。

标签: jquery jquery-mobile


【解决方案1】:

解决方案

我添加了。现在很好。

<meta content="width=device-width,minimum-scale=1,maximum-scale=1" name="viewport">

【讨论】:

    【解决方案2】:

    更好的视口值:

    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi">
    

    【讨论】:

    • 我试过你的线,但它让 Android Xperia 上的一切都缩小了一点。我拿出了 target-densityDpi=device-dpi 现在显示正常了。
    猜你喜欢
    • 1970-01-01
    • 2013-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-14
    • 2013-11-05
    • 1970-01-01
    • 2011-03-17
    相关资源
    最近更新 更多