按钮phonegap的Jquery移动自定义图标

时间:2014-02-13 21:08:39

标签: javascript css jquery-mobile cordova jquery-mobile-button

我正在尝试为我的jquery移动按钮使用自定义图标。但有些人如何只显示灰色圆圈代替图标。其他默认图标正常工作。

以下是index.html页面的代码

<style type="text/css">
        .ui-icon-medical-icon
        {
            background: url(images/icons-png/mfrg_18x18.png);
        }
</style>

 <div data-role="content">
            <a href="#" data-role="button" data-icon="medical-icon">Medical</a>
             <a href="#" data-role="button" data-icon="refresh">Fire</a>  
             <a href="#" data-role="button">Police</a>
        </div>

1 个答案:

答案 0 :(得分:0)

尝试为其定义宽度和高度。

   .ui-icon-medical-icon
    {
        background: url(images/icons-png/mfrg_18x18.png);
        width:18px;
        height:18px;
    }