4
我正在通过Angular.js Todo应用程序视频教程,我遇到了一个问题,其中包括index.html文件中的Twitter Bootstrap 3图形(图标显示为非描述性图像, Chrome和Firefox)。无法正确显示Twitter引导程序图形
这是怎么了增加引导和引导,glyphicons css文件中的index.html:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script type="text/javascript" src="todo.js"></script>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-glyphicons.css">
<link rel="stylesheet" href="todo.css">
</head>
这是怎么我在文件中后加入所需glyphicon:
<form class="form-horizontal">
<input type="text" ng-model="formTodoText" ng-model-instant>
<button class="btn"><i class="glyphicon glyphicon-plus"></i>Add</button>
</form>
bootstrap-glyphicons字体文件位于bootstrap/css/fonts中。具体而言,这些文件是:
- glyphiconshalflings-regular.eot
- glyphiconshalflings-regular.otf
- glyphiconshalflings-regular.svg
- glyphiconshalflings-regular.ttf
- glyphiconshalflings-regular.woff
有关如何正确访问图标的想法?非常感谢你的帮助!
刚刚尝试了三条建议 – Alexandra
@Alexandra在源代码中,您将看到资产的绝对路径。仔细检查一下你的'fonts'目录和'css'目录是否在同一层。 –
关于你的三点建议:1.我今天刚刚从Bootstrap网站下载了这些库,所以它们应该是最新的; 2.向资产路径添加“/”实际上阻止访问资产,所以我按照原样离开了路径; 3.用代替似乎没有任何区别。我不知道这是否重要,但“glyphicon glyphicon-minus/plus”工作,其他图标尝试不... – Alexandra