Jquery mobile JQuery Mobile-导航栏图标不显示

Jquery mobile JQuery Mobile-导航栏图标不显示,jquery-mobile,tabs,navbar,Jquery Mobile,Tabs,Navbar,我正在开发一个JQuery移动应用程序。在这个应用程序中,我有一个在页脚中使用导航栏的页面http://jquerymobile.com/demos/1.1.0-rc.1/docs/toolbars/docs-navbar.html. 这个导航栏有三个按钮 出于某种原因,我第一次导航到页面时,按钮显示默认的加号。但是,如果我刷新页面,或通过页脚中的其他按钮之一导航,我设置的图标将按需要显示。如何使导航栏始终显示我指定的图标?以下是与我的第一页关联的代码: <style type="text

我正在开发一个JQuery移动应用程序。在这个应用程序中,我有一个在页脚中使用导航栏的页面http://jquerymobile.com/demos/1.1.0-rc.1/docs/toolbars/docs-navbar.html. 这个导航栏有三个按钮

出于某种原因,我第一次导航到页面时,按钮显示默认的加号。但是,如果我刷新页面,或通过页脚中的其他按钮之一导航,我设置的图标将按需要显示。如何使导航栏始终显示我指定的图标?以下是与我的第一页关联的代码:

<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; }                

  #tab1 .ui-icon { background: url(/images/tab1.png) 50% 50% no-repeat; background-size: 24px 22px; }
  #tab2 .ui-icon { background: url(/images/tab2.png) 50% 50% no-repeat; background-size: 24px 22px; }       
  #tab3 .ui-icon { background: url(/images/tab3.png) 50% 50% no-repeat; background-size: 24px 22px; }       

</style>

<div id="tabsPage" data-role="page">
  <div data-role="header">
  </div>

  <div data-role="footer" class="navbar">
    <div data-role="navbar" class="navbar" data-grid="d">
      <ul>
        <li><a href="#" id="tab1" data-icon="custom" class="ui-btn-active">Tab 1</a></li>
        <li><a href="/tab2" id="tab2" data-icon="custom" rel="external" defaultPageTransition="none">Tab 2</a></li>
        <li><a href="/tab3" id="tab3" data-icon="custom" rel="external" defaultPageTransition="none">Tab 3</a></li>
      </ul>   
    </div>
  </div>
</div>

我不确定,但可能会添加到你的href

class="ui-icon"?

目前,CSS的目标是id为tab3的一类UI图标,请取出.UI图标或将其作为类添加到href中。

尝试将图像链接设置为绝对路径