Glyphicon没有显示laravel

时间:2017-10-24 13:51:03

标签: php twitter-bootstrap laravel glyphicons

我以这种方式在我的Laravel webapp中包含了glyphicon图标:

<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>

但它们未显示,因为找不到资源。

下面是HTTP 404的详细信息:

GET http://localhost:8000/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-
halflings-regular.woff2 [HTTP/1.0 404 Not Found 168ms]
downloadable font: download failed (font-family: "Glyphicons Halflings" 
style:normal weight:normal stretch:normal src index:1): status=2147746065 
source: http://localhost:8000/fonts/vendor/bootstrap-
sass/bootstrap/glyphicons-halflings-regular.woff2?
448c34a56d699c29117adc64c43affeb

提前致谢。

2 个答案:

答案 0 :(得分:2)

检查 your_project / public / fonts / vendor / bootstrap-sass / bootstrap

下是否有 glyphicons-halflings-regular.woff2 文件

错误是说您的浏览器找不到此文件,可能路径错误。

答案 1 :(得分:0)

您可以在html头中简单地使用CDN。

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">

现在尝试-

<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
相关问题