2015-11-04 122 views
-3

我使用這個代碼如下爲什麼我無法在我的網站上看到圖標?

@font-face { 
 
    font-family: 'icomoon'; 
 
    src:url('/../fonts/icomoon.eot') format('embedded-opentype'), 
 
     url('/../fonts/icomoon.ttf') format('truetype'), 
 
     url('/../fonts/icomoon.woff') format('woff'), 
 
     url('/../fonts/icomoon.svg') format('svg'); 
 
    font-weight: normal; 
 
    font-style: normal; 
 
}

+0

您需要包含嵌入此CSS的HTML代碼。 –

+0

你的網址指向好文件夾嗎? 您是否在要顯示圖標的元素上添加字體系列'icomoon'? – Prox

+0

你的網址有誤。使用相對的'..'或絕對。你正在使用兩個:) –

回答

0

,如果我使用此代碼

@font-face { 
 
    font-family: 'icomoon'; 
 
    src:url('icon-fonts/icomoon.html'); 
 
    src:url('icon-fonts/icomoond41d.html?#iefix') format('embedded-opentype'), 
 
     url('icon-fonts/icomoon-2.html') format('truetype'), 
 
     url('icon-fonts/icomoon-3.html') format('woff'), 
 
     url('icon-fonts/icomoon.svg#icomoon') format('svg'); 
 
    font-weight: normal; 
 
    font-style: normal; 
 
}

錯誤顯示在託管服務器和運行在本地正常系統

enter image description here

相關問題