我正在尝试使用以下内容加载搜索图标:
<div tabindex="6" class="glyphicon glyphicon-search">...<.div>
但是,字形图标加载如下:

解决方案是什么?
background-color:none transparent}@font-face{font-family:'Glyphicons Halflings';src:url(/css/fonts/glyphicons-halflings-regular.eot);src:url(/css/fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(/css/fonts/glyphicons-halflings-regular.woff) format('woff'),url(/css/fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(/css/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular)
发布于 2015-10-16 23:41:30
这是从Bootstrap site下载的Bootstrap3.2.0
解压并运行下面的代码
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="bootstrap3.2.0/css/bootstrap.min.css">
</head>
<body>
<div tabindex="6">
<span class="glyphicon glyphicon-search"></span>
<div>
</body>
</html> 工作方式与BS3.5类似
发布于 2015-10-16 19:26:45
检查此代码
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
<div tabindex="6">
<span class="glyphicon glyphicon-search"></span>
<div>
</body>
</html> 发布于 2017-05-05 11:01:13
尽管回答晚了,但对于有这个问题的人来说:
在标签中使用Bootstrap的CDN为我解决了这个问题。
https://stackoverflow.com/questions/33166827
复制相似问题