我使用的是Laravel 5.4&引导 - 萨斯。我试图在按钮中显示字形图标,但图标没有显示出来。
起初我得到404错误,这是因为我的项目位于子文件夹中,它正在查找根目录。所以我将app.css
更改为
@font-face {
font-family: 'Glyphicons Halflings';
src: url(/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1);
src: url(/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1?#iefix) format("embedded-opentype"), url(/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb) format("woff2"), url(/apps/myApp
/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158) format("woff"), url(/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512) format("truetype"), url(/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg?89889688147bd7575d6327160d64e760#glyphicons_halflingsregular) format("svg");
}
现在控制台正在抛出此错误
Failed to decode downloaded font: https://projects.example.com/apps/myApp/api/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1
OTS parsing error: invalid version tag
当我点击OTS parsing error: invalid version tag
时会显示此信息,当我将鼠标悬停在html标记上时,会显示invalid versioning tag
我从bootstrap网站下载了zip并替换了字体,我仍然得到相同的错误