【发布时间】:2016-04-12 21:42:05
【问题描述】:
我是新手
我创建了一个新页面,这是我的页面(上面没有内容!)
<!DOCTYPE html>
<html lang = "fa">
<head>
<meta charset = "utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TEST</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="style/index.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<header>
<div class="container">
<a class="fa fa-ban">Test ban</a>
</div>
</header>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</body>
</html>
如您所见,我有一个 <a> 元素,它有一个 font-awesome 类,我的意思是 fa fa-ban,但它不起作用!
有什么问题?
【问题讨论】:
-
检查控制台是否有错误,将脚本标签放在正文之外
-
@UbiquitousDevelopers 有一些警告,但我不知道为什么,我只是按照引导程序说的做了,我添加了一些对其 css 文件的引用......但我不知道是什么问题
-
它对我有用。只需使用 CTRL+F5 刷新页面
标签: css twitter-bootstrap fonts font-awesome