我正在尝试在我的JQuery Mobile应用程序的头文件中使用自定义图标。我试图使用的特定图标就是来自Glyphish(http://glyphish.com/)的“play”图标。当我尝试在标题中的右侧按钮中使用它时,如下所示: http://jquerymobile.com/demos/1.1.0-rc.1/docs/toolbars/docs-headers.html,我的图标显得很奇怪。我似乎无法在我的标题栏中获得简单的“播放”按钮。这是我的代码:JQuery Mobile Header中的自定义图标
<style type="text/css">
.navbar .ui-btn .ui-btn-inner { padding-top: 40px !important; }
.navbar .ui-btn .ui-icon { width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
#custom .ui-icon{ background: url(/images/play.png) 50% 50% no-repeat; background-size: 24px 22px; }
</style>
<div id="myPage" data-role="page" data-dom-cache="false">
<div data-role="header">
<h1>My Title</h1>
<a id="play" href="#" data-icon="custom" data-iconpos="notext" class="ui-btn-right jqm-plus">Continue</a>
</div>
<div data-role="content">
<!-- page content goes here -->
</div>
</div>
有人可以告诉我如何解决这个问题吗?
奇,与像@JQuery移动用户名,我想你将有答案。 – shanabus 2012-03-11 03:16:20
“codaniel”试图说的不是你以后的样子。他试图解释按钮自定义图标,但我意识到你正在寻找的是Navbar自定义图标。 看到这篇文章: http://stackoverflow.com/questions/6243871/glyphish-icons-display-in-jquery-mobile – 2012-09-04 01:03:27