bootstrap找不到glyphicons-halflings-regular.woff2

在vue2的项目中是用bootstrap,提示下面的字体文件找不到

http://localhost:8080/static/fonts/glyphicons-halflings-regular.woff2
http://localhost:8080/static/fonts/glyphicons-halflings-regular.woff
http://localhost:8080/static/fonts/glyphicons-halflings-regular.ttf

解决办法是:

  1. 修改bootstrap.min.css文件中关于字体的引用路径,如果你配置的静态文件路径是static,那就就改成../static/xxxxx
  2. 网上下载确实的字体文件,放到对应的目录搞定了

字体文件下载地址:

  1. http://code.taobao.org/p/shop_app/src/Public/bower_components/bootstrap/dist/fonts/
  2. http://files.cnblogs.com/files/wancy86/fonts.zip
原文地址:https://www.cnblogs.com/wancy86/p/7234987.html