来自 Ui Bootstrap 的 Datepickerpopup 不显示日历图标

Datepickerpopup from Ui Bootstrap doesn't show calendar icon

我正在学习 Ui Bootstrap. The code is exactly the same as here 中的教程。 如果我将 css line (<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">) 替换为本地 (<link href="css/bootstrap.min.css" rel="stylesheet">),日历图标就会消失,如图所示。我复制了确切的 bootstrap.min.css 并放入本地 css 文件夹中。有什么问题吗?

如果您打开控制台,您会发现对 glyphicon 字体的请求返回了 404 (NOT_FOUND),因为本地 .css 文件试图相对于它们所在的位置定位这些文件在(本地脚本而不是托管在 cdn 上)。

要解决此问题,您还必须在本地包含字形文件

另一种选择是完全放弃字形并使用 font awesome 或 octicons 之类的东西,因为 bootstrap 4 将删除字形。