无法显示脚形排序指示器



我在我的rails应用程序中使用footable。我实现了页面的排序和分页。排序和分页工作正常。但是可排序的字形图标未显示在表标题上。

我已经包括

在样式表中

footable.core.css
fonts
  footable.eot
  footable.svg
  footable.woff
  footable.ttf

在 javascript 目录中

footable.all.min.js

但我没有得到那些图标。我错过了什么吗?帮帮我。

嘿,我遇到了同样的问题。我只是使用了预定义的字形而不是可脚的字形,它奏效了。

在 footable.core 中.css像这样修改:

 @font-face {
  font-family: 'Glyphicons Halflings';
 src: url('~/fonts/glyphicons-halflings-regular.eot');
  src: url('~/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), 
      url('~/fonts/glyphicons-halflings-regular.woff') format('woff'),
       url('~/fonts/glyphicons-halflings-regular.ttf') format('truetype'), 
      url('~/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); font-weight: normal;
  font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  @font-face {
    font-family: 'Glyphicons Halflings';
    src: url('~/fonts/glyphicons-halflings-regular.svg#footable') format('svg');
    font-weight: normal;
    font-style: normal;
  }
}
.footable.breakpoint > tbody > tr > td > span.footable-toggle {
  display: inline-block;
  font-family: 'Glyphicons Halflings';
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  padding-right: 10px;
  text-align:center;
  font-size: 14px;
  color: #888888;
}
.footable > thead > tr > th > span.footable-sort-indicator {
  display: inline-block;
  font-family: 'Glyphicons Halflings';
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  padding-left: 5px;
}

瞧!它应该有效。在上面的代码中,我只显示了已修改的片段。对于字形,只需搜索"引导字形十六进制",就会找到您要使用的任何图标的代码。

最新更新