2015-11-03 86 views
0

我有問題,我想獲得相同的結果的例子(Fontawesom)https://fortawesome.github.io/Font-Awesome/examples/Fontawesome樣式不應用

我想要實現

固定寬度圖標

我已經在我的文件夾中下載了FontAwesome軟件包並添加了頭部鏈接我也嘗試過CDN,但結果相同。顯示圖標,但不會像示例中那樣應用樣式。

http://imgur.com/3KZgMoV

這裏是我的結果

<link rel="stylesheet" href="css/font-awesome.min.css"> 

,並列出

<div class="list-group"> 
      <a class="list-group-item" href="#"><i class="fa fa-home fa-fw"></i>&nbsp; Home</a> 
      <a class="list-group-item" href="#"><i class="fa fa-book fa-fw"></i>&nbsp; Library</a> 
      <a class="list-group-item" href="#"><i class="fa fa-pencil fa-fw"></i>&nbsp; Applications</a> 
      <a class="list-group-item" href="#"><i class="fa fa-cog fa-fw"></i>&nbsp; Settings</a> 
     </div> 

請幫幫忙,我在做什麼錯?

+0

請在問題中包含一個完整的但最小限度的repro。 – Jeroen

+0

是的一些代碼請 –

+0

請看我的更新 – fheoosghalzr

回答

0

樣式不一樣,因爲您在anchor標記中具有fontawesoms圖標,所以圖標會繼承錨點樣式。只要覆蓋這些樣式,如:

.list-group-item{ 
    color: #000; /* black */ 
    text-decoration: none; /* remove the underline */ 
    display: block; /* to make the anchors take full width */ 
} 
0

那麼要實現這一點,你必須相應地更新你的CSS。按照您的要求更改字體的顏色和大小。