2015-12-10 106 views
0

我有一個使用CSS類的螞蟻html頁面顯示一個AwesomeFont的內容f058,但它現在顯示爲一個正方形。真棒字體顯示爲正方形

HTML: -

<div class="sucessfullChange"> 

    <div class="sucessfullUsageChangeMessageConfirmation"> 

    </div> 
    <span style="word-break: break-all" class="sucessfullChangeMessage">Congrats.</span> 
</div> 

CSS: -

.sucessfullUsageChangeMessageConfirmation { 
    &:after { 
     content: "\f058"; 
     font-family: "FontAwesome"; 
     font-style: normal; 
     font-weight: normal; 
     text-decoration: inherit; 
     color: $colorGreen; 
     font-size: 31px; 
     padding-right: 0.5em; 
     position: absolute; 
     top: 13px; 
     left: 28px; 

     @include for-tablet { 
      left: 19px; 
     } 

     @include for-phone { 
      top: 14px; 
      left: 36px; 
     } 
    } 
} 

我在做什麼錯在這裏?

+1

請在您的字體真棒文件適當地包括? – devpro

+0

查看控制檯是否有錯誤,可能是您的字體未正確加載 –

回答

0

,如果你忘記添加字體真棒CSS閱覽室,PLZ加在你的HTML的head標籤的聯繫,

<link href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" type="text/css" rel="stylesheet" /> 

,我認爲它會爲你

0

工作,當圖標是顯示作爲一個方塊,它反映了它沒有正確鏈接。 您可以通過CDN使用這個鏈接cdn icons link

鏈接你的圖標,或者您可以選擇下載圖標爲PNG圖像,並利用它們來你的工作

http://fa2png.io/