2015-09-28 59 views
2

我有一個選項標籤這樣加入SVG文件到選項標籤

<option value="change" data-unit="{{ currency_string }}">{{ currency_string|upper }}<option> 

但是我想補充我的貨幣字符串作爲它的一個特定的符號,所以我想SVG文件整合裏面。通常情況下,我使用fontello.css所以我用

<span class="iconname"> 

直接但選項標籤我不能。

有人能告訴我如何整合它?

回答

0

對我來說,我可以添加字體ello字體就好了。
不是說我使用的cdn和url可能會從瀏覽器到瀏覽器有很大差異。
但這只是例子,在Firefox中起作用至少。
正確包含它應該適用於所有瀏覽器。

@font-face { 
 
    font-family: 'entypo'; 
 
    src: url('https://cdn.jsdelivr.net/entypo-fontello/0.1/entypo.eot'); 
 
    src: url('https://cdn.jsdelivr.net/entypo-fontello/0.1/entypo.eot?#iefix') format('embedded-opentype'), url('https://cdn.jsdelivr.net/entypo-fontello/0.1/entypo.woff') format('woff'), url('https://cdn.jsdelivr.net/entypo-fontello/0.1/entypo.ttf') format('truetype'), url('https://cdn.jsdelivr.net/entypo-fontello/0.1/entypo.svg#entypo') format('svg'); 
 
    font-weight: normal; 
 
    font-style: normal; 
 
} 
 
.entypo { 
 
    font-family: 'entypo'; 
 
    font-size: 2em; 
 
    font-weight: normal; 
 
    line-height: 0; 
 
}
<span>span elements</span> 
 
<p>without font-ello</p> 
 
<span class=""></span> 
 
<p>with font-ello</p> 
 
<br> 
 
<br/> 
 
<span class="entypo"></span> 
 
<p>option fontello</p> 
 
<select> 
 
    <option class="entypo"></option> 
 
    <option class="entypo"></option> 
 
</select> 
 
<p>nofontello</p> 
 
<select> 
 
    <option class=""></option> 
 
    <option class=""></option> 
 
</select>