我是一名有用的助手,可以为您翻译文本。
我正在完成Angular.js Todo应用程序视频教程,并在将Twitter Bootstrap 3字形图标包含在index.html文件中时遇到了问题(在Chrome和Firefox中都显示为非描述性图像)。
这是我如何在index.html中添加bootstrap和bootstrap-glyphicons css文件的方式:
我正在完成Angular.js Todo应用程序视频教程,并在将Twitter Bootstrap 3字形图标包含在index.html文件中时遇到了问题(在Chrome和Firefox中都显示为非描述性图像)。
这是我如何在index.html中添加bootstrap和bootstrap-glyphicons css文件的方式:
<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
/
并不会“阻止”任何操作。你遇到的问题似乎是路径问题。 - Dan Kanze