SSM-物流管理常见问题6-Bootstrap glyphicons-halflings-regular.woff2 Not found

因为自己的项目里面没有这个字体的包,所以在用的时候会报这个错误。

看了好几个关于Bootstrap glyphicons-halflings-regular.woff2 Not found,的博主写的,他们都没有具体的细节。

首先,出现这个问题的原因是,没有将具体的包引用完整

直接看我遇到的问题吧,我要使用这个包,直接连接是可以的,

<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
我下载到本地后是这样的

<link rel="stylesheet" href="css/bootstrap.min.css">
这个时候就出现问题了,我的解决办法是,根据它所提示的缺少的文件,去下载

提示中一般会提示缺少

glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff
glyphicons-halflings-regular.woff2
1,   这个时候你可以直接去下载文件
网址
http://cdn.bootcss.com/bootstrap/3.3.6/fonts/这里加上你所缺少的文件就可以下载了

比如,你缺少

glyphicons-halflings-regular.woff2
网址就是http://cdn.bootcss.com/bootstrap/3.3.6/fonts/glyphicons-halflings-regular.woff22,

2, 我的建议是你将它直接下载到和bootstrap.min.css同目录里面,这样方便你后期的地址更改

3,然后在你下载到本地里面的bootstrap.min.css中  使用Ctrl+f键查找

fonts/glyphicons-halflings-regular.woff2
 4,然后你会看到它的地址是
src:url(../fonts/glyphicons-halflings-regular.woff2)
你将相应的地址改到位,因为你下载的glyphicons-halflings-regular.woff2,是和bootstrap.min.css在同一目录下面的,这样你就可以直接这样应用

src:url(glyphicons-halflings-regular.woff2)
这样重复1 2 3 4 步直到你浏览器中没有了这样的错误提示为止。

这样问题基本可以解决了。



原文:https://blog.csdn.net/WWW_share8/article/details/79792902

猜你喜欢

转载自www.cnblogs.com/zxrxzw/p/11073812.html