[英]how to solve webfont problems
我在具有CDN鏈接的項目中使用Bootstrap.css和font-awesome.css。 例如:對於bootstrp
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootswatch/3.3.0/cerulean/bootstrap.min.css">
對於字體很棒
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
在我的代碼中,我使用class =“ glyphicon glyphicon-search”等。 但是當我從相同的鏈接分別下載css文件時。 並在本地添加依賴項,使其無法運行。 錯誤說
GET http://localhost:8451/ProntoDemo/resources/fonts/glyphicons-halflings-regular.woff
GET http://localhost:8451/ProntoDemo/resources/fonts/glyphicons-halflings-regular.ttf 404 (Not Found)
我不明白問題是什么。 請幫助我在本地運行。 喜歡
<link rel="stylesheet" href="./resources/css/bootstrap.min.css">
由於字體文件是捆綁提供的,因此它們具有包含字體的ttf(真型字體)文件。 因此,您需要下載zip並將其解壓縮到服務器,然后才可以鏈接css文件。
<link rel="stylesheet" href="Fonts/font-awesome-4.4.0/css/font-awesome.min.css">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.