【问题标题】:Add custom icon in jquery ui icon在 jquery ui 图标中添加自定义图标
【发布时间】:2014-04-14 19:28:10
【问题描述】:

我看到了描述如何添加自定义图标 jquery button() 的问题,但我想要的是 jquery ui 图标集中的图标,就像我们在中所做的那样

<span class="ui-icon ui-icon-home"></span>

【问题讨论】:

    标签: jquery jquery-ui icons customization


    【解决方案1】:

    您可以像这样将图标集图标应用于按钮:

    $(function()
    {
      $( "button:first" ).button({
      icons: {
       primary: "ui-icon-home"
      });
    });
    
    <button>Button with ui-icon-home</button>
    

    http://jqueryui.com/button/#icons

    【讨论】:

    • 这是问题所在,我不想使用 button() 我只想在没有按钮的任何地方使用图标
    • 哦。那么 应该可以吗?
    猜你喜欢
    • 2011-04-19
    • 1970-01-01
    • 1970-01-01
    • 2023-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-22
    • 1970-01-01
    相关资源
    最近更新 更多