我之前没有使用任何引导框架.我想在我的页面上包含bootstrap 3中的一些glyphicons.根据我的理解,他们应该包含在我已添加到我的页面的bootstrap.css文件中.当我查看bootstrap.css文件但是我没有看到任何对它们的引用?虽然它是一个大文件,但我可能错过了一些东西.
我注意到当我打开dist从bootstrap 3下载的 文件夹时,有一个单独的文件夹fonts,其中包含名为的文件:
glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff
Run Code Online (Sandbox Code Playgroud)
看起来像这是glyphicons但我不知道如何将这些附加到我的网站?如何将字形附加到我的页面?
在此先感谢您的帮助
下面的代码显示了附加的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>
Run Code Online (Sandbox Code Playgroud)
这是html代码的一部分,显示了glyphicons应该在哪里:
<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>
Run Code Online (Sandbox Code Playgroud)