0

这是我的html代码:

<!DOCTYPE html>
<!--
 test app
 -->
<html>
    <head>
        <title>jQuery Mobile page</title>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" charset="utf-8" href="http://darrenvenn.com/greenie.min.css" />
            <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile.structure-1.2.0.min.css" />
            <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
            <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
            <title>test app</title>
            </head>
    <body>
        <div data-role="page" data-theme="a">

            <div data-role="header" data-position="inline">
                <h1>Sample Header</h1>
            </div>
            <div data-role="content" data-theme="a">
                <input type="button" value="selection 1" onclick=""/>
                <p>
                <input type="button" value="selection 2" onclick="" />
                </p><p>
                <input type="button" value="selection 3" onclick="" />
                </p><p>
                <input type="button" value="selection 4" onclick="" />
                </p>
            </div>
                <script type="text/javascript" src="cordova-2.2.0.js"></script>
        </div>
    </body>
</html>

当我从浏览器运行它时,它发现 greenie.min.css 文件很好。当我在 PhoneGap/Xcode 中运行它时,它永远不会加载 css。想知道为什么我的 CSS 在浏览器中加载正常时不会加载到 PhoneGap 中。我尝试了许多不同的方式,使用普通版本和最小版本,在本地加载和从 url 加载,没有任何效果,没有。

这应该很简单!...

4

2 回答 2

0

检查 CSS 文件及其所在目录的权限。特别是,确保在 CSS 目录上设置了 x 标志。众所周知,这会在某些情况下影响 CSS 加载,例如在具有某些电子阅读器(包括 iBooks)的 EPUB 中。

于 2012-12-26T03:11:07.500 回答
0

对我来说,这是因为我的路径是从“/”开始的。这在 Chrome 和 Android 中运行良好,但由于某种原因在 IOS 上运行良好。

于 2015-07-17T20:19:36.103 回答