我以前没有使用过任何引导框架。我想在我的页面上的 bootstrap 3 中包含一些字形图标。据我了解,它们应该包含在我添加到页面的 bootstrap.css 文件中。当我查看 bootstrap.css 文件时,我没有看到对它们的任何引用?虽然它是一个大文件,但我可能错过了一些东西。
我注意到,当我打开 dist
从 bootstrap 3 下载的文件夹时,有一个单独的文件夹fonts
,其中包含名为:
glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff
看起来这就是字形图标所在的地方,但是我不知道如何将它们附加到我的网站上?如何将字形图标附加到我的页面?
感谢您提前提供任何帮助
下面的代码显示了附加的 bootstrap.css 文件:
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap example</title>
<meta name="viewport" content="width=divice-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="bootstrap.css" rel="stylesheet" media="screen">
</head>
这是html
显示字形图标应该在哪里的代码部分:
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#"><span class="glyphicon glyphicon-home"></span>
Home</a></li>
<li><a href="#"><span class="glyphicon glyphicon-star"></span> Top
Destinations</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="glyphicon glyphicon-user"></span> About Us<b class="caret"></b></a>