【问题标题】:Glyphicons in Bootstrap 4Bootstrap 4中的字形图标
【发布时间】:2020-11-08 13:01:18
【问题描述】:

我正在使用 Bootstrap 4。我想在 Datatable 中使用 Glyphicon。我包括font-awsome

我的 CSS 代码如下所示

table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::after, table.dataTable thead .sorting_asc_disabled::after, table.dataTable thead .sorting_desc_disabled::after {
content: "\e252" !important;
font-family: "Font Awesome 5 Free";
display: inline-block;
padding-right: 3px;
vertical-align: middle;
font-weight: 900;

}

但我得到如下输出

【问题讨论】:

    标签: bootstrap-4 glyphicons font-awesome-4


    【解决方案1】:

    Font Awesome 缺少字体文件。如果您查看font-awesome.css 文件,您会看到它在其父目录中需要一个字体文件夹。

    @font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0'); ...
    

    预期的文件夹结构 -

    |- css
    |-- bootstrap-4.css
    |-- font-awesome.css
    |- fonts
    |-- font-awesome.eot
    |-- font-awesome.ttf
    |-- ...
    

    【讨论】:

      猜你喜欢
      • 2017-11-09
      • 2018-05-25
      • 2016-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-28
      • 2015-02-24
      • 1970-01-01
      相关资源
      最近更新 更多