jQuery Mobile 后退按钮中的图像不出现
我已经按照 jQueryMobile 文档的说明将 jQueryMobile 插件设置到我的博客移动版本中。
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
描述页面如下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Against All Odds</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<link rel="stylesheet" href="_assets/css/jqm-docs.css"/>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>my title</h1>
</div><!-- /header -->
<div data-role="content">
my description
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
不幸的是,后退按钮中的图像没有出现在我的页面中。我还将 jQuerymobile 图像文件夹放入我的项目页面中。是否有任何配置我忘记设置了?
I've set-up jQueryMobile plugin into my blog mobile version by the instruction of jQueryMobile documentation.
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
and description page is as follow
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Against All Odds</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<link rel="stylesheet" href="_assets/css/jqm-docs.css"/>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>my title</h1>
</div><!-- /header -->
<div data-role="content">
my description
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
Unfortunately, the image in back button doesn't appear in my page. And I've also put jQuerymobile images folder into my project page. Is there any configuration did I forget to setup?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该检查 http://jquerymobile.com/download/ 以及页面末尾的 zip 文件。
zip 文件包含图像目录。
您必须将 images 目录放置在与 jquery mobile css 文件相同的目录中。
You should check http://jquerymobile.com/download/ and the zip file at the end of the page.
The zip file contains the images directory.
You have to place the images directory in the same directory as your jquery mobile css file.
我昨天查看了这段代码,但没有查看 Alpha 2 版本(从 2010 年 11 月 12 日开始),我去了 jquery-mobile GitHub 页面并获取主分支 download.zip。
下面的代码将后退按钮添加到标题中,并将
data-icon
自动设置为arrow-l
。我还忘记将图像目录放入我的项目中。我还需要包含这些 js 和 css 文件,我将它们从下载内容复制到项目的根目录中。
I was looking through this code yesterday, but instead of looking at the Alpha 2 release (from Nov 12, 2010), I went out to the jquery-mobile page on GitHub and got the master branch download.zip.
The code below is what adds the back button to the header and auto sets the
data-icon
toarrow-l
. I had also forgot to put the images directory in my project.I also needed to include these js and css files, which I copied from the download into the root directory of my project.
后退按钮中需要
data-icon="arrow-l"
。我不确定他们如何将其设置为 jquerymobile.com 文档页面自动生成的后退按钮的默认值。调查一下。稍后再回来。另外 - 你不应该复制 jqm-docs.css
data-icon="arrow-l"
is needed in the back button. I'm not sure how they make it the default for auto-generated back button ojn jquerymobile.com docs pages. Looking into it. Come back later.Also - you shouldn't copy the jqm-docs.css