2015-04-03 69 views
1

如何在ui.bootstrap.rating中使用Font Awesome? 我發現,當我添加state-on="'fa-star'" state-off="'fa-star-o'"和更改class="glyphicon"class="fa"在ui-bootstrap-tpls它的作品。 但我想有一個更自定義的方式來更改圖標的類。在ui.bootstrap.rating中使用Font Awesome

回答

0

是的,因爲你正在設置state-offstate-on是他們的推薦方式。如果您要在網頁上獲得很多評分,我只需創建一個自定義模板並覆蓋該模板。 Here is a post custom templates

1

我有字體真棒,所以不想包括字形。

uib.bootstrap版本:1.3.3 - 2016年5月22日利用有限Glyphicons,所以這是我加入到我的CSS

.glyphicon { 
    display: inline-block; 
    font: normal normal normal 14px/1 FontAwesome; 
    font-size: inherit; 
    text-rendering: auto; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
} 
.glyphicon-star:before { 
    content: "\f005"; 
} 
/** 
copied from 
.fa-star:before { 
    content: "\f005"; 
} 
*/ 
.glyphicon-star-empty::before { 
    content: "\f006"; 
} 
.glyphicon-chevron-right:before { 
    content: "\f054"; 
} 
.glyphicon-chevron-left:before { 
    content: "\f053"; 
} 
.glyphicon-chevron-up:before { 
    content: "\f077"; 
} 
.glyphicon-chevron-down:before { 
    content: "\f078"; 
} 

即添加CSS從字體真棒4.6.3適當glyphicon名稱

現在我不知道這段代碼是否會破解Font Awesome的版本