详解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 步直到你浏览器中没有了这样的错误提示为止。

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





评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值