Ответ 1
Я все равно не могу найти; Я думаю, что это еще не реализовано в jQuery UI.
Вы можете перейти на fontawesome
, которые поддерживают то, что вы ищете.
Если вы хотите выровнять все значки пользовательского интерфейса jQuery со шрифтовым видом, вы можете использовать этот взлом для замены css:
/* Allow Font Awesome Icons in lieu of jQuery UI and only apply when using a FA icon */
.ui-icon[class*=" icon-"] {
/* Remove the jQuery UI Icon */
background: none repeat scroll 0 0 transparent;
/* Remove the jQuery UI Text Indent */
text-indent: 0;
/* Bump it up - jQuery UI is -8px */
margin-top: -0.5em;
}
.ui-button-icon-only .ui-icon[class*=" icon-"] {
/* Bump it - jQuery UI is -8px */
margin-left: -7px;
}
/* Allow use of icon-large to be properly aligned */
.ui-icon.icon-large {
margin-top: -0.75em;
}
это для замены, но вы можете напрямую использовать значки шрифтов:
<i class="icon-camera-retro"></i> icon-camera-retro
Отличный ответ Q/A: Расширение значков пользовательского интерфейса jQuery с помощью шрифта-Удивительного
Демо: http://jsfiddle.net/IrvinDominin/bEd2R/
UPDATE
Ответ обновлен для FontAwesome 4.0, который немного изменил классы css, потому что:
Иконки были переименованы для улучшения согласованности и предсказуемости.
Ссылка: http://fortawesome.github.io/Font-Awesome/whats-new/
код:
/* Allow Font Awesome Icons in lieu of jQuery UI and only apply when using a FA icon */
.ui-icon[class*=" fa-"] {
/* Remove the jQuery UI Icon */
background: none repeat scroll 0 0 transparent;
/* Remove the jQuery UI Text Indent */
text-indent: 0;
/* Bump it up - jQuery UI is -8px */
margin-top: -0.5em;
}
.ui-button-icon-only .ui-icon[class*=" fa-"] {
/* Bump it - jQuery UI is -8px */
margin-left: -7px;
}
/* Allow use of icon-large to be properly aligned */
.ui-icon.icon-large {
margin-top: -0.75em;
}