为什么bootstrap没有加载字体?

时间:2015-12-22 18:55:44

标签: html css fonts

我有两页,第一页是登录页面。在该页面中,字体加载如下:

demonstration

但是在第二页(登录后)字体没有加载,我不知道为什么。

demonstration

以下是我的登录页面的代码:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="./css/bootstrap/bootstrap.min.css" />
<script src="./js/jquery/jquery.min.js"></script>
<title>Online Learning</title>
</head>
<body>
    <div class="container" style="font-family: cursive;">
        <!-- ... -->
    </div>
</body>
</html>

和secod页面:

&#13;
&#13;
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="./css/bootstrap/bootstrap.min.css" />
<!-- None of these css and js do any thing with font face -->
<link rel="stylesheet" href="./css/teacher/teacher_layout.css">
<link rel="stylesheet" href="./css/teacher/materials_teacher.css">
<script src="./js/jquery/jquery.min.js"></script>
<script src="./js/bootstrap/bootstrap.min.js"></script>
<script src="./js/js_layout.js"></script>
<script src="./js/materials_teacher.js"></script>

<title>Teacher-Materials</title>
</head>
<body>
    <!-- I'm sure this include file wont affect -->
    <%@include file="./common/header.jsp" %>
    <div class="row content_body">
        <!-- ... -->
    </div>
</body>
</html>
&#13;
&#13;
&#13;

编辑:在第二页:此行<span class="glyphicons glyphicons-remove"></span>不呈现任何内容(空白),但在第一页中呈现&#39; X&#39;图标。

EDIT2:更改第二页后,仍然没有加载字体:

&#13;
&#13;
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="./css/bootstrap/bootstrap.min.css" />
<script src="./js/jquery/jquery.min.js"></script>

<title>Teacher-Materials</title>
</head>
<body>
    <span class="glyphicons glyphicons-remove">a</span>
</body>
</html>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

Awwwww,终于得到了这片沙滩!度过我的一半。

http://glyphicons.com/提供的跨区代码与bootstrap提供的代码不匹配,请查看此测试:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="./css/bootstrap/bootstrap.min.css" />
<script src="./js/jquery/jquery.min.js"></script>
<title>Teacher-Materials</title>
</head>
<body>
<div class="container" style="font-family: cursive;">
	<div>
    	      <span class="glyphicon glyphicon-remove">a</span>
        </div>
        <div>
              <span class="glyphicons glyphicons-remove">a</span>
	</div>
</div>
</body>
</html>