不使用库的glyphicon

时间:2016-07-19 19:31:34

标签: css

是否可以在不加载整个库的情况下加载引导程序图标?我尝试将引导字体粘贴到css中,但仍然没有运气 - 这可以实现吗?

@font-face {
  font-family: 'Glyphicons Halflings';

  src: url('/fonts/ChaparralPro-Regular.woff');
  src: url('/fonts/fontawesome-webfont.woff2?v=4.6.3');
  src: url('/font/glyphicons-halflings-regular.ttf');
  src: url('/fonts/glyphicons-halflings-regular.woff');
  src: url('/font/glyphicons-halflings-regular.woff2');
  src: url('/fonts/kievitot-book-webfont.woff');
 src: url('fonts/Segoe_ui-webfont.woff');
}

.glyphicon-thumbs-up:before {
  content: "\e125";
}
.glyphicon {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: 'Glyphicons Halflings';
  font-style: normal;
  font-weight: normal;
  line-height: 1;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
 <i class="glyph-icon icon-chevron-down"></i>

1 个答案:

答案 0 :(得分:0)

尝试使用flaticon.com,您可以搜索大量图标,它会自动生成样式表和字体文件,并带有多个扩展名。因此,您可以轻松导入到项目中。